Last active
May 4, 2019 16:11
-
-
Save Beyarz/f06153d078e05ffcb4610e70cd46771c to your computer and use it in GitHub Desktop.
Revert to Youtubes old design
This file contains 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
/* property | |
cookie, forEach, includes, join, split | |
*/ | |
// Go to youtube | |
// Open the dev tool | |
// Go to the console section | |
// Paste the code below | |
const cookie = document.cookie.split(' ') | |
let counter = 0 | |
let atThis | |
cookie.forEach((element) => { | |
element.includes('PREF') ? atThis = counter : counter += 1 | |
}) | |
cookie[atThis] = 'PREF=al=en&f5=30030&f6=8;' | |
delete document.cookie | |
document.cookie = cookie.join(' ') | |
// Or use this oneliner | |
const cookie=document.cookie.split(' ');let counter=0;let atThis;cookie.forEach((element)=>{element.includes('PREF')?atThis=counter:counter+=1});cookie[atThis]='PREF=al=en&f5=30030&f6=8;';delete document.cookie;document.cookie=cookie.join(' '); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment