Android用Webブラウザ「Mikan Browser」についての情報をまとめるためのwikiです。

UserCSS Template

Android Mikan Browser Part.4 レス634より転載
http://anago.2ch.net/test/read.cgi/applism/1355622...

// ==UserScript==
// @name UserCSS Template
// @include http://www.google.co.jp/m?q=*
// ==/UserScript==
// @include に適用したいURLを指定(ワイルドカード使用可)
(function() {
// 以下のcssの中身に適用したいCSSを入れる。
var css = function(){/*

a{color: red !Important;}
cite{color: blue !Important;}

*/}.toString().split(/\n/).slice(1, -1).join("\n");
//includeが効かないみたいなので、こちらでチェック。正規表現部分マッチです。
if (! document.URL.match(/http:\/\/www\.google\.co\.jp/i) ) return;

var heads = document.getElementsByTagName("head");
if (heads.length > 0) {
var node = document.createElement("style");
node.type = "text/css";
node.appendChild(document.createTextNode(css));
heads[0].appendChild(node);
}
})();

※この部分はなくてもいいっぽいよ
//includeが効かないみたいなので、こちらでチェック。正規表現部分マッチです。
if (! document.URL.match(/http:\/\/www\.google\.co\.jp/i) ) return;

コメントをかく


「http://」を含む投稿は禁止されています。

利用規約をご確認のうえご記入下さい

どなたでも編集できます