Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name tiktok.com disable user-post agewall
- // @namespace https://greasyfork.org/en/users/85671-jcunews
- // @version 1.0.1
- // @license AGPL v3
- // @author jcunews
- // @description Context: https://www.reddit.com/r/userscripts/comments/103bsf6/script_request_remove_sensitive_content_warning/
- // @match https://www.tiktok.com/*
- // @grant none
- // @run-at document-start
- // ==/UserScript==
- (() => {
- var gei = HTMLDocument.prototype.getElementById;
- HTMLDocument.prototype.getElementById = function(id) {
- if (id === "SIGI_STATE") SIGI_STATE.text = SIGI_STATE.text.replace(/,"maskType":\d+/g, "");
- return gei.apply(this, arguments)
- };
- var js = Response.prototype.json;
- Response.prototype.json = function(s) {
- var r = js.apply(this, arguments);
- if (/tiktok\.com\/api\/post\/item_list/.test(this.url)) {
- r.then(o => {
- if (o?.itemList?.forEach) {
- o.itemList.forEach(b => {
- delete b.maskType
- })
- }
- })
- }
- return r
- };
- })()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement