pixiv -modal
by
noromanba
2015-03-01 [2015/03/01 03:24:33]
hidden welcome-modal on pixiv for non-member
@@ -6,8 +6,21 @@
* @javascript_url
* @private WIP
*/
-
(function () {
- (document.querySelector('#register-introduction-modal') || {}).style.display = 'none';
+ if (!/www\.pixiv\.net$/.test(location.hostname)) return;
+
+ var addStyle = (function () {
+ var parent = document.head || document.body || document.documentElement;
+
+ var style = document.createElement('style');
+ style.type = 'text/css';
+ parent.appendChild(style);
+
+ return function (css) {
+ style.appendChild(document.createTextNode(css + '\n'));
+ };
+ })();
+
+ addStyle('#register-introduction-modal { display: none; }');
})();
(function () {
if (!/www\.pixiv\.net$/.test(location.hostname)) return;
var addStyle = (function () {
var parent = document.head || document.body || document.documentElement;
var style = document.createElement('style');
style.type = 'text/css';
parent.appendChild(style);
return function (css) {
style.appendChild(document.createTextNode(css + '\n'));
};
})();
addStyle('#register-introduction-modal { display: none; }');
})();
- Permalink
- このページへの個別リンクです。
- RAW
- 書かれたコードへの直接のリンクです。
- Packed
- 文字列が圧縮された書かれたコードへのリンクです。
- Userscript
- Greasemonkey 等で利用する場合の .user.js へのリンクです。
- Loader
- @require やソースコードが長い場合に多段ロードする Loader コミのコードへのリンクです。
- Metadata
- コード中にコメントで @xxx と書かれたメタデータの JSON です。