IG denoiser
by
noromanba
2019-05-29 [2019/05/29 08:11:58]
hidden user comments on instagram.com
@@ -18,27 +18,19 @@
(() => {
'use strict';
- // TBD omit
if (!location.hostname.endsWith('.instagram.com')) {
return;
}
- const addStyle = (() => {
- const wall = document.head || document.body || document.documentElement;
+ const wall = document.head || document.body || document.documentElement;
- const style = wall.appendChild(Object.assign(document.createElement('style'), {
- type: 'text/css',
- charset: 'utf-8',
- }));
-
- return (css) => {
- style.appendChild(document.createTextNode(css + '\n'));
- };
- })();
-
-
- addStyle([
- 'article ul li:not(:first-child)',
- ] + '{ display: none !important; }');
+ wall.append(Object.assign(document.createElement('style'), {
+ charset: 'utf-8',
+ textContent: `
+ article ul ul {
+ display: none !important;
+ }
+ `,
+ }));
})();
(() => {
'use strict';
if (!location.hostname.endsWith('.instagram.com')) {
return;
}
const wall = document.head || document.body || document.documentElement;
wall.append(Object.assign(document.createElement('style'), {
charset: 'utf-8',
textContent: `
article ul ul {
display: none !important;
}
`,
}));
})();
- Permalink
- このページへの個別リンクです。
- RAW
- 書かれたコードへの直接のリンクです。
- Packed
- 文字列が圧縮された書かれたコードへのリンクです。
- Userscript
- Greasemonkey 等で利用する場合の .user.js へのリンクです。
- Loader
- @require やソースコードが長い場合に多段ロードする Loader コミのコードへのリンクです。
- Metadata
- コード中にコメントで @xxx と書かれたメタデータの JSON です。