always Responsive Design View mode

Fix web page content area size

スクリプトをインストールするには、Tampermonkey, GreasemonkeyViolentmonkey のような拡張機能のインストールが必要です。

You will need to install an extension such as Tampermonkey to install this script.

スクリプトをインストールするには、TampermonkeyViolentmonkey のような拡張機能のインストールが必要です。

スクリプトをインストールするには、TampermonkeyUserscripts のような拡張機能のインストールが必要です。

このスクリプトをインストールするには、Tampermonkeyなどの拡張機能をインストールする必要があります。

このスクリプトをインストールするには、ユーザースクリプト管理ツールの拡張機能をインストールする必要があります。

(ユーザースクリプト管理ツールは設定済みなのでインストール!)

このスタイルをインストールするには、Stylusなどの拡張機能をインストールする必要があります。

このスタイルをインストールするには、Stylus などの拡張機能をインストールする必要があります。

このスタイルをインストールするには、Stylus tなどの拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

(ユーザースタイル管理ツールは設定済みなのでインストール!)

このスクリプトの質問や評価の投稿はこちら通報はこちらへお寄せください
// ==UserScript==
// @author      Shyangs
// @name        always Responsive Design View mode
// @description Fix web page content area size
// @namespace   https://greasyfork.org/users/91-shyangs
// @include     chrome://browser/content/browser.xul
// @version     0.1
// @icon        http://www.gravatar.com/avatar/b4067537364e89cce0d6f91e193420d0
// @license     MIT License; http://opensource.org/licenses/mit-license.php
// ==/UserScript==
/* 
 適應性設計檢視模式 解析度固定為320x480
 Responsive Design View: Fix web page content area size
 */
(function(){

	let width = 320;  // 寬度
	let height = 480; // 高度

	if( "undefined" === typeof(gBrowser) ) return;
	let Fix_ResponsiveUI_Size = function(){
		let aTab = gBrowser.mCurrentTab;
		if(!ResponsiveUI.ResponsiveUIManager.isActiveForTab(aTab)) ResponsiveUI.toggle();
		aTab.__responsiveUI.setSize(width, height);
	};
	Fix_ResponsiveUI_Size();

	/* 考慮在每一個分頁和新開啟的分頁都固定內容尺寸大小,
		偵聽事件: 選擇/切換另一個分頁
	*/
	let tabs = gBrowser.tabContainer;
	tabs.addEventListener('select', Fix_ResponsiveUI_Size);
})();