1 名前:名無しさん@お腹いっぱい。 mailto:sage [2007/07/25(水) 14:57:49 ID:eh8pidTp0] mozilla firefox userChrome.js greasemonkey スクリプトスレ2 質問は必ずまとめサイトに目を通した後にして下さい。 ■まとめサイト firefoxまとめサイト ttp://firefox.geckodev.org/ ttp://firefox.geckodev.org/index.php?cmd=read&page=Greasemonkey&word=greasemonkey ttp://firefox.geckodev.org/index.php?cmd=read&page=userChrome.js&word=user ■拡張機能 greasemonkey ttp://www.greasespot.net/ userChrome.js ttp://forums.mozillazine.org/viewtopic.php?t=397735&sid=4b6a2d2f1d22cf05c4bda988683c1f94 ttp://forums.mozillazine.org/viewtopic.php?t=556229 ■関連スレ Mozilla Firefox usercontent.css 広告カットスレ 1 ttp://pc9.2ch.net/test/read.cgi/software/1139710935/ Mozilla Firefox Part71 ttp://pc11.2ch.net/test/read.cgi/software/1184830949/ ttp://pc11.2ch.net/test/read.cgi/software/1184830215/ Mozilla Firefox質問スレッド(初心者歓迎)の48 ttp://pc11.2ch.net/test/read.cgi/software/1183499942/ Mozilla Firefox 拡張機能スレッド Part22 ttp://pc11.2ch.net/test/read.cgi/software/1182355151/ ■前スレ ttp://pc11.2ch.net/test/read.cgi/software/1168635399/
432 名前:part1 mailto:sage [2007/09/12(水) 21:44:55 ID:2OxpCduk0] >>430 前半部分 (function() { window.SelectionAsURL = function() { var win = document.commandDispatcher.focusedWindow; var sel = win.getSelection().toString(); var flag = false; var tab; sel = sel.split("\n"); sel.forEach(function(str) { str = str.match(/([a-zA-Z0-9\+\$\;\?\.%,!#~\*\/:@&=_-]+)/); if ( !str || str[1].indexOf(".") < 0 ) return; str = str[1]; if ( str.indexOf("ttp://") == 0 ) str = "h" + str; tab = gBrowser.loadOneTab(str, null, null, null, true, false); flag = true; }); if ( !flag ) { var searchBar = BrowserSearch.getSearchBar(); searchBar._textbox.value = sel; var inputEvent = document.createEvent('Events'); if (inputEvent){ inputEvent.initEvent('oninput', true, true); searchBar.dispatchEvent(inputEvent); } tab = BrowserSearch.loadSearch(sel, true); } gBrowser.selectedTab = tab; };
433 名前:part2 mailto:sage [2007/09/12(水) 21:45:39 ID:2OxpCduk0] >>430 後半部分 var newItem = document.createElement("menuitem"); newItem.setAttribute("label", "\u9078\u629e\u7bc4\u56f2\u3092\u958b\u304f"); newItem.setAttribute("id", "OpenSelection_menu"); newItem.setAttribute("oncommand", "SelectionAsURL();"); newItem.setAttribute("accesskey", "o"); document.getElementById("contentAreaContextMenu").appendChild(newItem); document.getElementById("contentAreaContextMenu").addEventListener("popupshowing", function() { document.getElementById("OpenSelection_menu").hidden = !gContextMenu.isTextSelected; }, false); })();