您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Greasy Fork is available in English.
Makes it so nothing is marked as sensitive.
当前为
// ==UserScript== // @name Twitter hide content warning crap // @namespace http://tampermonkey.net/ // @version 0.10 // @description Makes it so nothing is marked as sensitive. // @author cromachina // @match https://*.twitter.com/* // @icon https://www.google.com/s2/favicons?domain=twitter.com // @grant none // @license MIT // ==/UserScript== /* jshint esversion: 6 */ (function() { 'use strict'; let find_objects_at_keys = function(obj, keys) { let found = []; let stack = Object.entries(obj); while (stack.length > 0) { let current = stack.pop(); if (keys.indexOf(current[0] != -1)) { found.push(current[1]); } if (current[1] != null && typeof(current[1]) == 'object') { stack = stack.concat(Object.entries(current[1])); } } return found; }; let fix_media = function(data) { for (let obj of find_objects_at_keys(data, ['media'])) { if (!Array.isArray(obj)) { continue; } for (let media of obj) { if (typeof media != 'object') { continue; } delete media.sensitive_media_warning; media.ext_sensitive_media_warning = null; } }; }; // Intercept JSON parses to alter the sensitive media data. let old_parse = JSON.parse; JSON.parse = function(string) { let data = old_parse(string); fix_media(data); return data; }; })();