This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/ldrize_cooperation.js b/ldrize_cooperation.js | |
| index b33c58f..a08c68e 100644 | |
| --- a/ldrize_cooperation.js | |
| +++ b/ldrize_cooperation.js | |
| @@ -133,14 +133,14 @@ if (liberator.plugins.LDRizeCooperation == undefined) (function(){ | |
| this.LDRizeCooperationPanel = this.setupStatusbarPanel(); | |
| this.isEnable = liberator.globalVariables.ldrc_enable != undefined ? | |
| - window.eval(liberator.globalVariables.ldrc_enable) : true ; | |
| + liberator.eval(liberator.globalVariables.ldrc_enable) : true ; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // :urlcanonicalize, :urlnormalize --- URL正規化 {{{ | |
| // @http://pathtraq.com/developer/#help_normalize_url | |
| // @http://d.hatena.ne.jp/janus_wel/20080924/1222244725 | |
| commands.addUserCommand( | |
| ['url[canonicalize]', 'url[normalize]'], 'URL Canonicalization', | |
| function (arg) { | |
| if (arg.bang) | |
| { | |
| let req = new libly.Request("http://api.pathtraq.com/normalize_url2?url=" + buffer.URL); | |
| req.addEventListener("onSuccess", function (res) liberator.open(libly.$U.evalJson(res.responseText))); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // :reloadBrowserObject --- :reload + BrowserObject {{{ | |
| (function(){ | |
| if (liberator.plugins.browser_object_api) { | |
| commands.addUserCommand( | |
| ["reloadB[rowserObject]"], "Reload the tabs with BrowserObject", | |
| function (args) browser_object_api.select(args.string, args["-number"]).forEach(function (aTab) tabs.reload(aTab, args.bang)), | |
| {options: browser_object_api.options}, | |
| true | |
| ); | |
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // :tabbo --- :tabdo + BrowserObject {{{ | |
| // @http://code.google.com/p/vimperator-labs/source/browse/common/content/tabs.js#645 | |
| (function(){ | |
| if (liberator.plugins.browser_object_api) { | |
| commands.addUserCommand( | |
| ['tabb[o]'], 'tabdo + BrowserObject', | |
| function (args) { | |
| let current = browser_object_api.current(); | |
| browser_object_api.select(args.string, args["-number"]).forEach(function (aTab) { | |
| tabs.select(aTab._tPos); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // :wakeup --- BarTabで待機させている複数のタブを、BrowserObject風のオプションで指定して読み込む {{{ | |
| // @http://github.com/philikon/BarTab/blob/master/modules/prototypes.js#L236 | |
| (function(){ | |
| if (liberator.plugins.browser_object_api) { | |
| commands.addUserCommand( | |
| ['wak[eup]'], 'Wake up!Wake up!Wake up!', | |
| browser_object_api.select(args.string, args["-number"]).forEach(function (aTab) gBrowser.BarTabHandler.loadTab(aTab)); | |
| {options: browser_object_api.options}, | |
| true | |
| ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // BrowserObject API -- liberator.plugins.browser_object_api {{{ | |
| // @http://gist.github.com/gists/423725 | |
| // @http://coderepos.org/share/browser/lang/javascript/vimperator-plugins/trunk/browser_object.js | |
| // @http://piro.sakura.ne.jp/latest/blosxom/mozilla/xul/2009-01-24_tab.htm | |
| liberator.plugins.browser_object_api = (function () { | |
| let collection = function () Array.slice(gBrowser.mTabs).filter(function (aNode) aNode.localName == 'tab'); | |
| let active = function () gBrowser.mTabContainer.selectedIndex; | |
| let identify = function (i) {try{return i.linkedBrowser.contentDocument.location.host}catch(e){}}; | |
| let browser_object_api = { | |
| /* BrowserObject API */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python | |
| #-*- coding:utf-8 -*- | |
| """ | |
| http://www.fujitv.co.jp/heisei/04.html | |
| (問) | |
| 8個の数字の配列の規則を見つけ、 | |
| ?に入る数を答えなさい | |
| → 4 → 16 → 37 → 58 → 89 → 145 → 42 → ? ↓ | |
| ↑←←←←←←←←←←←←←←←←←←←←←←←← |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // JSDeferred 0.3.1 Copyright (c) 2007 cho45 ( www.lowreal.net ) | |
| // See http://coderepos.org/share/wiki/JSDeferred | |
| // {{{ | |
| function Deferred () { return (this instanceof Deferred) ? this.init() : new Deferred() } | |
| Deferred.ok = function (x) { return x }; | |
| Deferred.ng = function (x) { throw x }; | |
| Deferred.prototype = { | |
| init : function () { | |
| this._next = null; | |
| this.callback = { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| liberator.plugins.alternates = (function(){ // {{{ | |
| let _alternates = tabs._alternates; | |
| plugins.libly.$U.around( | |
| tabs, | |
| "updateSelectionHistory", | |
| function(next, args){ | |
| _alternates.unshift(tabs.getTab()); | |
| return next(); | |
| }, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // VimperatorでXPathで指定した範囲を選択する | |
| let Node = plugins.libly.$U.getFirstNodeFromXPath("//*"); | |
| if (Node) | |
| { | |
| let range = content.document.createRange(); | |
| range.selectNodeContents(Node); | |
| content.getSelection().addRange(range); | |
| } |