2005 | 01 | 02 | 03 | 04 | 05 | 06 | 07 | 08 | 09 | 11 | 12
2006 | 01 | 02 | 03 | 04 | 05 | 06 | 07 | 10 | 11
2007 | 01 | 04 | 05 | 06 | 07 | 08 | 12
2008 | 01

06/01

アンチ「もんたメソッド」なbookmarklet

tags: (5), (37)

Blog Hackers Conference 2005以来、「もんたメソッド」が流行ってるらしいですね。乗り遅れました。癪なので「もんたメソッドを台無しにするbookmarklet」を書いてみた。

javascript:(function(){var e=document.getElementsByTagName('*');var v=document.defaultView;for(var i=0;i<e.length;i++){if(v)var s=v.getComputedStyle(e[i],'');if((v&&s.getPropertyValue('background-color')==s.getPropertyValue('color'))||(e[i].currentStyle&&e[i].currentStyle.backgroundColor==e[i].currentStyle.color))try{e[i].style.backgroundColor='inherit'}catch(x){e[i].style.backgroundColor=e[i].parentNode.currentStyle.backgroundColor}}})();

Firefox/IE/Operaにて、antipopで紹介されていたいくつかのサイトで確認。原理は、スタイルシートでbackground-color(背景色)とcolor(文字の色)が同じ指定になっている(みんなこうしてるっぽい)要素を発見した場合に、背景色を親要素と同じものに変えてシールを全部剥がします。やったね!適当だけどうまく行きそうなんでリリース。Let's enjoy anti-monta method!!

XULなやつは無理です。

追記: Ctrl-Aでいいじゃんとか言わない(で下さい)。Greasemonkeyスクリプトにして自動化しましょう。

03:21 | 0 Writeback(s) | (5), (37) | ?B

Writebacks

Trackback

このエントリへのトラックバック pingは まで。

Post a comment

[http://... or mailto:you@wherever] (optional)