mirror of
https://github.com/moparisthebest/android.moparisthebest.org
synced 2024-11-01 07:45:01 -04:00
8698a276f9
highlighting tests, improved syntax highlighting and styling of pre blocks. Overriding dynamic gist styling. Added a plugin for pygments caching which should speed things up terrifically. added ender.js as a lightweight way of scripting the DOM, events, etc. Some general typography and semantic html improvements.
21 lines
578 B
JavaScript
21 lines
578 B
JavaScript
// https://gist.github.com/901295
|
|
// By @mathias, @cheeaun and @jdalton
|
|
|
|
(function(doc) {
|
|
var addEvent = 'addEventListener',
|
|
type = 'gesturestart',
|
|
qsa = 'querySelectorAll',
|
|
scales = [1, 1],
|
|
meta = qsa in doc ? doc[qsa]('meta[name=viewport]') : [];
|
|
function fix() {
|
|
meta.content = 'width=device-width,minimum-scale=' + scales[0] + ',maximum-scale=' + scales[1];
|
|
doc.removeEventListener(type, fix, true);
|
|
}
|
|
if ((meta = meta[meta.length - 1]) && addEvent in doc) {
|
|
fix();
|
|
scales = [.25, 1.6];
|
|
doc[addEvent](type, fix, true);
|
|
}
|
|
}(document));
|
|
|