From caae0f44284b966be0af43c02e1d187e08159418 Mon Sep 17 00:00:00 2001 From: drry Date: Thu, 10 Apr 2008 05:25:05 +0000 Subject: lang/javascript/vimperator-plugins/trunk/gmperator.js: * td 要素が抜け落ちていたのを修整しました。ごめんなさい。 * ほか。 git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@9245 d0d07461-0603-4401-acd4-de1884942a52 --- gmperator.js | 63 ++++++++++++++++++++++++------------------------------------ 1 file changed, 25 insertions(+), 38 deletions(-) (limited to 'gmperator.js') diff --git a/gmperator.js b/gmperator.js index 9b4af67..f3786a6 100644 --- a/gmperator.js +++ b/gmperator.js @@ -30,7 +30,7 @@ * The change is permanent, not only the session. * And cannot get back. * - * ex) + * e.g.) * :gmset! {filename} -n fooScriptName -i http://*,https://* -e http://example.com/* * toggle enable or disable, * name to "fooScriptName", @@ -43,8 +43,8 @@ * --------------------------- * {{{ * - * 1). can access to the sandbox of Greasemonkey !!! - * 2). can register commands which execute + * 1). you can access to the sandbox of Greasemonkey !!! + * 2). you can register commands to execute * when the user script is executed on the URI * @see liberator.plugins.gmperator.addAutoCommand * @@ -66,7 +66,7 @@ * encludes : {String[]} * ) * addAutoCommand : function( uri, script, cmd ) - * If both of uri and script is match + * If both of uri and script are matched * * ) * }}} @@ -88,7 +88,7 @@ liberator.plugins.gmperator = (function(){ //{{{ // PUBLIC section // ----------------------- // {{{ - var manager = { + var manager = { register: function (uri,sandbox,script){ var panelID = getPanelID(sandbox.window); var gmCon; @@ -97,26 +97,18 @@ liberator.plugins.gmperator = (function(){ //{{{ } else { gmCon = new GmContainer(uri,sandbox); containers[panelID] = gmCon; - this.__defineGetter__(panelID,function(){return gmCon;}); - log('gmpeartor: redisted: '+ panelID + ' - ' + uri); + this.__defineGetter__(panelID,function() gmCon); + log('gmpeartor: Registered: ' + panelID + ' - ' + uri); } gmCon.sandbox = sandbox; gmCon.addScript(script); gmCon.uri = uri; autocommands.trigger('GMInjectedScript',uri+'\n'+script.filename); }, - get gmScripts(){ - return getScripts(); - }, - get allItem(){ - return containers; - }, - get currentPanel(){ - return getBrowser().mCurrentTab.linkedPanel; - }, - get currentContainer(){ - return containers[this.currentPanel] || null; - }, + get gmScripts() getScripts(), + get allItem() containers, + get currentPanel() getBrowser().mCurrentTab.linkedPanel, + get currentContainer() containers[this.currentPanel] || null, get currentSandbox(){ var id = this.currentPanel; return containers[id] ? containers[id].sandbox : null; @@ -170,7 +162,7 @@ liberator.plugins.gmperator = (function(){ //{{{ return tab.linkedPanel; } } - liberator.log(win + 'is no found'); + liberator.log(win + 'is not found'); } function updateGmContainerList(e){ var t = e.target; @@ -192,7 +184,6 @@ commands.addUserCommand(['gmli[st]','lsgm'], 'list Greasemonkey scripts', //{{{ var str = ''; var scripts = getScripts(); var reg; - var table, tr; if (special || arg == 'full'){ reg = new RegExp('.*'); } else if( arg ){ @@ -205,7 +196,8 @@ commands.addUserCommand(['gmli[st]','lsgm'], 'list Greasemonkey scripts', //{{{ } } } else { - table =
-e
-exclude