![]() |
Gallery/GoogleImage最終更新: 2011-05-30 (月) 18:38:28 (4393d) |
type:a, b, JS無効用 全て入れておくといいかも
概要
問題点
[Patterns] Name = "Google Image: Image Changer [2011/04/26] Lookahead (type:a)" Active = TRUE URL = "(images|www).google.co(m|.jp)/(images\?|search\?(*\&|)tbm=isch)" Limit = 128 Match = "<end>" Replace = "<script type="text/javascript" defer="defer">" "try {" " google.isr.Hover.S;" "} catch(e) {" " _d = document;" " addImage();" " if (window.attachEvent)" " attachEvent('onresize', checkImage);" " else" " addEventListener('resize', checkImage, false);" "}" "function swapImage() {" " this.style.display = 'none';" " if (this.nextSibling && this.nextSibling.tagName === 'IMG')" " this.nextSibling.style.display = 'inline';" " else" " this.previousSibling.style.display = 'inline';" "}" "function deleteImage() {" " if (this.tagName === 'TD')" " var o = this;" " else" " o = this.parentNode.parentNode;" " o.onmouseover = o.onmouseout = '';" " o.style.backgroundColor = '#ccc';" " o.innerHTML = '';" "}" "function addImage(){" " var obj = _d.getElementsByTagName('IMG');" " len = obj.length;" " for (var i = 0; len > i; ++i)" " if (/^https?:\\/\\/(?:[^\\/]+?\\.|)(?:google|gstatic)\\.co(?:m|\\.jp)\\/imgres\\?/i.test(obj[i].parentNode.href)) {" " var frm = obj[i].parentNode.href;" " var ref = decodeURIComponent(frm.match(/[?&]imgrefurl=([^&]+)/i)[1]);" " var img = decodeURIComponent(frm.match(/[?&]imgurl=([^&]+)/i)[1]);" " obj[i].parentNode.href = 'javascript:void(0)';" " obj[i].parentNode.target = '_self';" " obj[i].onclick = swapImage;" " obj[i].ondblclick = deleteImage;" " obj[i].parentNode.parentNode.onmouseover = function(){ this.style.backgroundColor = '#fdd' };" " obj[i].parentNode.parentNode.onmouseout = function(){ this.style.backgroundColor = '' };" " obj[i].parentNode.parentNode.ondblclick = deleteImage;" "" " /* width&height SITEI TAISAKU */" " var obj_img = _d.createElement('IMG');" " /* obj_img.src = decodeURIComponent(obj[i].src.match(/^https?:\\/\\/(?:[^\\/]+?\\.|)(?:gstatic|google)\\.co(?:m|\\.jp)\\/images\\?q=tbn:[^:]+:(.+)/i)[1]); */" " obj_img.src = img;" " obj_img.style.cssText = obj[i].style.cssText + '; display:none';" " obj_img.onclick = swapImage;" " obj_img.ondblclick = deleteImage;" " obj[i].parentNode.appendChild(obj_img);" " ++len;++i;" "" " var span = _d.createElement('SPAN');" " span.innerHTML = '<br /><a target="_blank" href="'+ref+'">ref</a> / <a target="_blank" href="'+obj_img.src+'">img</a> / <a target="_blank" href="'+frm+'">frm</a>';" " obj[i].parentNode.parentNode.appendChild(span);" " }" "}" "function checkImage(){" " if (len != _d.getElementsByTagName('IMG').length)" " addImage();" "}" "</script>"
type:a が動かない場合用(併用推奨)
概要
問題点
[Patterns] Name = "Google Image: Image Changer [2011/04/27] hover (type:b window.open)" Active = TRUE URL = "(images|www).google.co(m|.jp)/(images\?|search\?(*\&|)tbm=isch)" Limit = 256 Match = "([{;])\0" "( [a-z_.]++" "getElementById\($AV(rg_hl)\)" ")\1" Replace = "$STOP()" "\0" "var frm = arguments[4];" "var ref = decodeURIComponent(frm.match(/[?&]imgrefurl=([^&]+)/i)[1]);" "var img = decodeURIComponent(frm.match(/[?&]imgurl=([^&]+)/i)[1]);" "arguments[6] = '<a target="_self" href="javascript:void(0)" onclick="window.open(\\''+frm+'\\',\\'_blank\\',\\'menubar=yes,toolbar=yes,location=yes,status=yes,resizable=yes,scrollbars=yes\\');return false">frm</a>" " / <a target="_self" href="javascript:void(0)" onclick="window.open(\\''+ref+'\\',\\'_blank\\',\\'menubar=yes,toolbar=yes,location=yes,status=yes,resizable=yes,scrollbars=yes\\');return false">ref</a>" " / <a target="_self" href="javascript:void(0)" onclick="window.open(\\''+img+'\\',\\'_blank\\',\\'menubar=yes,toolbar=yes,location=yes,status=yes,resizable=yes,scrollbars=yes\\');return false">img</a>" "<br />' + arguments[6];" "\1"
JSを無効にしているときのみ有効(AutoPagerizeで読み込んだページも処理してくれるかも)
画像クリックで画像を入れ替えたりする機能はない
[Patterns] Name = "Google Image: Image Change [2011/05/30] (NoJS)" Active = TRUE URL = "(images|www).google.co(m|.jp)/(images\?|search\?(*\&|)tbm=isch)" Limit = 1024 Match = "<a href=$AV(/imgres\?imgurl=\0\&(amp;|)imgrefurl=\1(\&*|(^?)))[^>]+> <img[^>]+>&&<a \9" Replace = "<a target="_blank" \9<br /><a target="_blank" href="$UESC(\0)">img</a> / <a target="_blank" href="$UESC(\1)">ref</a>"
[Patterns] Name = "Google Image: Image Change [2011/05/30] Lookahead (NoJS)" Active = FALSE URL = "(images|www).google.co(m|.jp)/(images\?|search\?(*\&|)tbm=isch)" Limit = 1024 Match = "<a href=$AV(/imgres\?imgurl=\0\&(amp;|)imgrefurl=\1(\&*|(^?)))[^>]+> <img[^>]+>&&<a \9" Replace = "<a target="_blank" \9<br /><a target="_blank" href="$UESC(\0)">img</a> / <a target="_blank" href="$UESC(\1)">ref</a>" "<img src="$UESC(\0)" width=0 height=0>"
[HTTP headers] In = FALSE Out = TRUE Key = "Referer: delete GoogleImage [2011/04/26] (out)" Match = "http://(images|www).google.co(m|.jp)/(images\?|search\?(*\&|)tbm=isch|imgres)