Skip to content

Instantly share code, notes, and snippets.

@mtripg6666tdr
Created November 3, 2023 06:28
Show Gist options
  • Save mtripg6666tdr/fcfd47f9261c8e8d1a8c12f80e3d0e6d to your computer and use it in GitHub Desktop.
Save mtripg6666tdr/fcfd47f9261c8e8d1a8c12f80e3d0e6d to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name Restore Twitter Circle Feature
// @namespace https://nspace.usamyon.moe/
// @version 0.1
// @description Restore twitter Circle Feature
// @author mtripg6666tdr
// @match https://twitter.com/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=twitter.com
// @grant none
// @run-at document-start
// ==/UserScript==
(function() {
'use strict';
console.log("Restore Twitter Circle Feature: Setup a hook.");
let INITIAL_STATE_STORE = {};
Object.defineProperty(window, "__INITIAL_STATE__", {
get: () => INITIAL_STATE_STORE,
set(newValue){
const current = newValue?.featureSwitch?.user?.config?.trusted_friends_tweet_creation_enabled?.value;
if(current === false){
newValue.featureSwitch.user.config.trusted_friends_tweet_creation_enabled.value = true;
}
INITIAL_STATE_STORE = newValue;
},
configurable: true,
});
// Your code here...
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment