- Go to a page other than Home (e.g. Notifications)
- Refresh the tab so you don't have any Home timeline Tweets cached
- Paste the code from
patch.jsinto the F12 developer Console - Your Following feed will now be sorted by "Popular" until you next refresh the tab
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| let $reactRoot = document.querySelector('#react-root') | |
| let wrapped = $reactRoot.firstElementChild.wrappedJSObject || $reactRoot.firstElementChild | |
| let reactPropsKey = Object.keys(wrapped).find(key => key.startsWith('__reactProps')) | |
| let featureSwitches = wrapped[reactPropsKey].children?.props?.children?.props?.contextProviderProps?.featureSwitches | |
| let isTrue = featureSwitches.isTrue | |
| featureSwitches.isTrue = (flag) => { | |
| if (flag == 'rweb_age_assurance_flow_enabled') return false | |
| return isTrue(flag) | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function downloadTranscript() { | |
| let $segments = document.querySelector('.ytd-transcript-search-panel-renderer #segments-container') | |
| let sections = [] | |
| let parts = [] | |
| for (let $el of $segments.children) { | |
| if ($el.tagName == 'YTD-TRANSCRIPT-SECTION-HEADER-RENDERER') { | |
| if (parts.length > 0) { | |
| sections.push(parts.join(' ')) | |
| parts = [] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| window.fetch = new Proxy(window.fetch, { | |
| apply(target, thisArg, argArray) { | |
| let promise = Reflect.apply(target, thisArg, argArray) | |
| let url = argArray[0] instanceof Request ? argArray[0].url : argArray[0] | |
| if (url.includes('reel_item_watch')) { | |
| console.log('intercepting reel_item_watch') | |
| return promise.then(response => { | |
| response.clone().json().then(json => { | |
| let menuItems = json.overlay.reelPlayerOverlayRenderer.menu.menuRenderer.items | |
| let openAppItem = menuItems.find(item => |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Array.from( | |
| document.querySelectorAll('#items.yt-multi-page-menu-section-renderer ytd-compact-link-renderer[compact-link-style="compact-link-style-type-selection-menu"]'), | |
| el => el.data.serviceEndpoint.signalServiceEndpoint.actions[0].selectLanguageCommand.hl | |
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "manifest_version": 3, | |
| "name": "Hide YouTube Shorts", | |
| "description": "Hides YouTube Shorts", | |
| "version": "1.0", | |
| "content_scripts": [ | |
| { | |
| "matches": [ | |
| "https://www.youtube.com/*", | |
| "https://m.youtube.com/*" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function getState() { | |
| let $reactRoot = document.querySelector('#react-root') | |
| let wrapped = $reactRoot.firstElementChild['wrappedJSObject'] || $reactRoot.firstElementChild | |
| let reactPropsKey = Object.keys(wrapped).find(key => key.startsWith('__reactProps')) | |
| if (reactPropsKey) { | |
| let state = wrapped[reactPropsKey].children?.props?.children?.props?.store?.getState() | |
| if (state) return state | |
| warn('React state not found') | |
| } else { | |
| warn('React prop key not found') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵 | |
| 🔵🟡🟡🟡🔵🔵🟡🔵🔵🔵🟡🟡🔵🟡🔵🟡🔵 | |
| 🔵🟡🔵🔵🔵🟡🔵🟡🔵🟡🔵🔵🔵🟡🔵🟡🔵 | |
| 🔵🟡🟡🟡🔵🟡🟡🟡🔵🔵🟡🔵🔵🔵🟡🔵🔵 | |
| 🔵🟡🔵🔵🔵🟡🔵🟡🔵🔵🔵🟡🔵🔵🟡🔵🔵 | |
| 🔵🟡🟡🟡🔵🟡🔵🟡🔵🟡🟡🔵🔵🔵🟡🔵🔵 | |
| 🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵 |
NewerOlder