Skip to content

Userscript and userstyle to make YouTube look how it did in 2016/2017

License

Notifications You must be signed in to change notification settings

aubymori/Dekevlarize

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Dekevlarize

A userscript and userstyle to make YouTube look how it did in 2016/2017

Installation

  1. Install Stylus ( Chromium / Firefox )
  2. Install Tampermonkey ( Chromium / Firefox )
  3. Install the script and style with these links;

For developers

CSS

Dekevlarize's stylesheet is written in LESS, which is a superset of CSS that makes it easier to manage and generally results in cleaner source code. You can learn more about LESS at lesscss.org.

JavaScript

Dekevlarize takes advantage of the way elements are built in YouTube's version of Polymer to make for easy changing of text, icons, and the such. Basically, the data property of most elements with names starting in ytd- or yt- (i.e. document.querySelector("ytd-watch-flexy").data) contain the InnerTube data that was used to build it. We can modify this data, and then re-initialize the element to make it take effect, either by storing the data in a variable, setting the data to {} and changing it back, or creating a copy of the element in its place. This can actually reveal unused elements in the templates, such as the date text in ytd-video-secondary-info-renderer, and a count in ytd-guide-entry-renderer.

TLDR: Do not change innerText or otherwise modify HTML directly unless it is absolutely necessary. Return YouTube Dislike's extension is a great example of this. It broke with YouTube's segmentedLikeDislikeButtonRenderer update, and has generally had issues in the past.

Localization

Most, if not all regexes in the localization of the userscript are extraction tools for text that YouTube has. Do not attempt to translate these by hand, get the text from YouTube and put that there.

About

Userscript and userstyle to make YouTube look how it did in 2016/2017

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published