せっかく立ったスレだから、もっと有意義に使おうよ。 @-moz-document url-prefix(http://tv.yahoo.co.jp/) { body > div:first-child, center > table:first-child, table[cellpadding="4"], center > hr, center > div, center > small { display: none !important; } }
2chのスレページにある リンクの"■掲示板に戻る■"、ページ下部の"read.cgi ver ** FOX ★" を非表示にするにはuserContent.cssにどのような記述をすればいいでしょうか? 上部の広告+"新着スレ"リンク+ページサイズ表示部分は非表示に出来たのですが上記の部分だけどうしても出来ません。
/** * A user script for userChrome.js extension. * @nameExtended 'Open Selection in new Tab' gesture * @descriptionOpen all URLs in selection by 'Open Selection in new Tab' command of All-in-One Gestures * @compatibilityFirefox 2.0, All-in-One Gestures 0.18.0 * @authorGomita * @version2006.10.22 * @permalinkhttp://amb.vis.ne.jp/mozilla/?p=48 */ aioSelectionAsURL = function() { // getBrowserSelection function couldn't be apply since it removes all line breaks. var win = document.commandDispatcher.focusedWindow; var sel = win.getSelection().toString(); if ( !sel ) return; // process each lines var flag = false; sel = sel.split("\n"); sel.forEach(function(str) { // extract strings which may be URL (not strict) 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; // Open in a background tab gBrowser.loadOneTab(str, null, null, null, true, false); flag = true; }); // If the selection doesn't contain URL, we does Web-Search it. if ( !flag ) BrowserSearch.loadSearch(sel, true); };
>>78 aioSelectionAsURL(); を呼べば動くでしょ。 勝手にdrag and go 仕様にしてみた。えらいてきとー。 /* Original by @authorGomita */ contentAreaDNDObserver.onDragOver = function(aEvent, aFlavour, aDragSession) { aEvent.target.setAttribute("dragover", "true"); return (aDragSession.canDrop = true); }; contentAreaDNDObserver.onDrop = function() { // getBrowserSelection function couldn't be apply since it removes all line breaks. var win = document.commandDispatcher.focusedWindow; var sel = win.getSelection().toString(); if ( !sel ) return; // process each lines var flag = false; sel = sel.split("\n"); sel.forEach(function(str) { // extract strings which may be URL (not strict) 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; // Open in a background tab gBrowser.loadOneTab(str, null, null, null, true, false); flag = true; }); // If the selection doesn't contain URL, we does Web-Search it. if ( !flag ) BrowserSearch.loadSearch(sel, true); }; getBrowser().addEventListener("dragover", function(aEvent) { nsDragAndDrop.dragOver(aEvent, contentAreaDNDObserver); }, false);