From 8fb2c681dbaac0930b00c814c1843517ef0eed32 Mon Sep 17 00:00:00 2001 From: piro Date: Wed, 23 Jun 2010 01:32:31 +0000 Subject: [PATCH] =?UTF-8?q?=E3=83=A9=E3=82=A4=E3=83=96=E3=83=A9=E3=83=AA?= =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: http://www.cozmixng.org/repos/piro/treestyletab/trunk@6695 599a83e7-65a4-db11-8015-0010dcdd6dc2 --- modules/animationManager.js | 12 +++++++----- modules/autoScroll.js | 11 ++++++----- modules/boxObject.js | 11 ++++++----- modules/extensions.js | 11 ++++++----- modules/prefs.js | 12 ++++++------ modules/stringBundle.js | 11 ++++++----- 6 files changed, 37 insertions(+), 31 deletions(-) diff --git a/modules/animationManager.js b/modules/animationManager.js index b62da449..dd90aed5 100644 --- a/modules/animationManager.js +++ b/modules/animationManager.js @@ -24,13 +24,15 @@ http://www.cozmixng.org/repos/piro/fx3-compatibility-lib/trunk/animationManager.js */ -if ('window' in this && !window) { // work as a JS Code Module - var EXPORTED_SYMBOLS = ['window', 'animationManager']; +/* To work as a JS Code Module (*require namespace.jsm and jstimer.jsm) + http://www.cozmixng.org/repos/piro/fx3-compatibility-lib/trunk/namespace.jsm + http://www.cozmixng.org/repos/piro/fx3-compatibility-lib/trunk/jstimer.jsm */ +if (typeof window == 'undefined') { + this.EXPORTED_SYMBOLS = ['animationManager']; let ns = {}; Components.utils.import('resource://treestyletab-modules/namespace.jsm', ns); - - var window = ns.getNamespaceFor('piro.sakura.ne.jp'); + /* var */ window = ns.getNamespaceFor('piro.sakura.ne.jp'); if (!('setInterval' in window)) Components.utils.import('resource://treestyletab-modules/jstimer.jsm', window); } @@ -150,5 +152,5 @@ if ('window' in this && !window) { // work as a JS Code Module })(); if (window != this) { // work as a JS Code Module - var animationManager = window['piro.sakura.ne.jp'].animationManager; + this.animationManager = window['piro.sakura.ne.jp'].animationManager; } diff --git a/modules/autoScroll.js b/modules/autoScroll.js index be82ff10..9ed1f860 100644 --- a/modules/autoScroll.js +++ b/modules/autoScroll.js @@ -12,13 +12,14 @@ http://www.cozmixng.org/repos/piro/fx3-compatibility-lib/trunk/autoScroll.js */ -if ('window' in this && !window) { // work as a JS Code Module - var EXPORTED_SYMBOLS = ['window', 'autoScroll']; +/* To work as a JS Code Module (*require namespace.jsm) + http://www.cozmixng.org/repos/piro/fx3-compatibility-lib/trunk/namespace.jsm */ +if (typeof window == 'undefined') { + this.EXPORTED_SYMBOLS = ['autoScroll']; let ns = {}; Components.utils.import('resource://treestyletab-modules/namespace.jsm', ns); - - var window = ns.getNamespaceFor('piro.sakura.ne.jp'); + /* var */ window = ns.getNamespaceFor('piro.sakura.ne.jp'); } (function() { @@ -172,5 +173,5 @@ if ('window' in this && !window) { // work as a JS Code Module })(); if (window != this) { // work as a JS Code Module - var autoScroll = window['piro.sakura.ne.jp'].autoScroll; + this.autoScroll = window['piro.sakura.ne.jp'].autoScroll; } diff --git a/modules/boxObject.js b/modules/boxObject.js index f96d6789..6a2b5939 100644 --- a/modules/boxObject.js +++ b/modules/boxObject.js @@ -13,13 +13,14 @@ http://www.cozmixng.org/repos/piro/fx3-compatibility-lib/trunk/boxObject.js */ -if ('window' in this && !window) { // work as a JS Code Module - var EXPORTED_SYMBOLS = ['window', 'boxObject']; +/* To work as a JS Code Module (*require namespace.jsm) + http://www.cozmixng.org/repos/piro/fx3-compatibility-lib/trunk/namespace.jsm */ +if (typeof window == 'undefined') { + this.EXPORTED_SYMBOLS = ['boxObject']; let ns = {}; Components.utils.import('resource://treestyletab-modules/namespace.jsm', ns); - - var window = ns.getNamespaceFor('piro.sakura.ne.jp'); + /* var */ window = ns.getNamespaceFor('piro.sakura.ne.jp'); } (function() { @@ -166,5 +167,5 @@ if ('window' in this && !window) { // work as a JS Code Module })(); if (window != this) { // work as a JS Code Module - var boxObject = window['piro.sakura.ne.jp'].boxObject; + this.boxObject = window['piro.sakura.ne.jp'].boxObject; } diff --git a/modules/extensions.js b/modules/extensions.js index dbe4692c..48fcb1cf 100644 --- a/modules/extensions.js +++ b/modules/extensions.js @@ -16,13 +16,14 @@ http://www.cozmixng.org/repos/piro/fx3-compatibility-lib/trunk/extensions.js */ -if ('window' in this && !window) { // work as a JS Code Module - var EXPORTED_SYMBOLS = ['window', 'extensions']; +/* To work as a JS Code Module (*require namespace.jsm) + http://www.cozmixng.org/repos/piro/fx3-compatibility-lib/trunk/namespace.jsm */ +if (typeof window == 'undefined') { + this.EXPORTED_SYMBOLS = ['extensions']; let ns = {}; Components.utils.import('resource://treestyletab-modules/namespace.jsm', ns); - - var window = ns.getNamespaceFor('piro.sakura.ne.jp'); + /* var */ window = ns.getNamespaceFor('piro.sakura.ne.jp'); } (function() { @@ -193,5 +194,5 @@ if ('window' in this && !window) { // work as a JS Code Module })(); if (window != this) { // work as a JS Code Module - var extensions = window['piro.sakura.ne.jp'].extensions; + this.extensions = window['piro.sakura.ne.jp'].extensions; } diff --git a/modules/prefs.js b/modules/prefs.js index c2c95d2e..a04fbb2b 100644 --- a/modules/prefs.js +++ b/modules/prefs.js @@ -26,13 +26,14 @@ http://www.cozmixng.org/repos/piro/fx3-compatibility-lib/trunk/prefs.test.js */ -if ('window' in this && !window) { // work as a JS Code Module - var EXPORTED_SYMBOLS = ['window', 'prefs']; +/* To work as a JS Code Module (*require namespace.jsm) + http://www.cozmixng.org/repos/piro/fx3-compatibility-lib/trunk/namespace.jsm */ +if (typeof window == 'undefined') { + this.EXPORTED_SYMBOLS = ['prefs']; let ns = {}; Components.utils.import('resource://treestyletab-modules/namespace.jsm', ns); - - var window = ns.getNamespaceFor('piro.sakura.ne.jp'); + /* var */ window = ns.getNamespaceFor('piro.sakura.ne.jp'); } (function() { @@ -163,6 +164,5 @@ if ('window' in this && !window) { // work as a JS Code Module }; })(); -if (window != this) { // work as a JS Code Module - var prefs = window['piro.sakura.ne.jp'].prefs; +if (this.prefs = window['piro.sakura.ne.jp'].prefs; } diff --git a/modules/stringBundle.js b/modules/stringBundle.js index 18710c96..6d04c591 100644 --- a/modules/stringBundle.js +++ b/modules/stringBundle.js @@ -14,13 +14,14 @@ http://www.cozmixng.org/repos/piro/fx3-compatibility-lib/trunk/stringBundle.js */ -if ('window' in this && !window) { // work as a JS Code Module - var EXPORTED_SYMBOLS = ['window', 'stringBundle']; +/* To work as a JS Code Module (*require namespace.jsm) + http://www.cozmixng.org/repos/piro/fx3-compatibility-lib/trunk/namespace.jsm */ +if (typeof window == 'undefined') { + this.EXPORTED_SYMBOLS = ['stringBundle']; let ns = {}; Components.utils.import('resource://treestyletab-modules/namespace.jsm', ns); - - var window = ns.getNamespaceFor('piro.sakura.ne.jp'); + /* var */ window = ns.getNamespaceFor('piro.sakura.ne.jp'); } (function() { @@ -82,5 +83,5 @@ if ('window' in this && !window) { // work as a JS Code Module })(); if (window != this) { // work as a JS Code Module - var stringBundle = window['piro.sakura.ne.jp'].stringBundle; + this.stringBundle = window['piro.sakura.ne.jp'].stringBundle; }