Skip to content

Instantly share code, notes, and snippets.

@Beyarz
Last active May 4, 2019 16:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Beyarz/f06153d078e05ffcb4610e70cd46771c to your computer and use it in GitHub Desktop.
Save Beyarz/f06153d078e05ffcb4610e70cd46771c to your computer and use it in GitHub Desktop.
Revert to Youtubes old design
/* 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