私の質問に答えるには:-)。あなたはそれを行うことができ、あなたは3つのものが必要です:
- グレースマノンの同等のAndroid - USI addonを使用することができます。
- タグを追加するスクリプト。
@run-at document-start
スクリプト用のユーザースクリプト指令。
viewport
メタタグを動的に変更すると、うまく動作しないため、実際には3番目の部分がFirefoxにとって重要です。ドキュメントが読み込まれたときに追加すると、奇妙な結果が得られます(PPK's postも参照)。
これは、ビューポートを追加するユーザースクリプトの例です:
// ==UserScript==
// @name Mobile example.com
// @namespace com.something.unique.to.me
// @description Forces the website to behave responsive. Note that you probably need some CSS too.
// @include http://example.com/*
// @include https://example.com/*
// @version 1.0
// @grant none
// @run-at document-start
// ==/UserScript==
function addViewport() {
var metaTag=document.createElement('meta');
metaTag.name = "viewport"
metaTag.content = "width=device-width, initial-scale=1.0"
document.querySelector('head').appendChild(metaTag);
}
addViewport();
出典
2016-04-18 09:05:07
Nux