Tech-How / Light-Theme-for-YouTube-Music

A refreshing new look for YouTube Music.
22 stars 2 forks source link

Automatic Install and Updates from GitHub #3

Closed Devo7v closed 1 year ago

Devo7v commented 1 year ago

You can allow people to 1-click install this style directly from GitHub and have it update within the Stylish extension by adding some header information. The first thing you need to do is rename the file to something like: theme.user.css

Then you need to add a link with in the readme that links directly to the raw file (https://raw.githubusercontent.com/Tech-How/Light-Theme-for-YouTube-Music/main/theme**.user.css**)

You also need to had this header information to the css file:

/* ==UserStyle==
@name           Light Theme for YouTube Music
@namespace   Tech-How
@version     0.1
@homepageURL https://github.com/Tech-How/Light-Theme-for-YouTube-Music
@supportURL  https://github.com/Tech-How/Light-Theme-for-YouTube-Music/issues
@updateURL   https://raw.githubusercontent.com/Tech-How/Light-Theme-for-YouTube-Music/main/theme**.user.css**
@description add a 1-2 sentence description
@license     choose a license you'd like to use
@author      Tech-How

@preprocessor stylus

==/UserStyle== */

Finally, any time you update the style, you'll need to update the version number within the style. Once installed in Stylish, when you check for updates, Stylish will go to the updateURL for your theme, compare the version number on GitHub to the local version number and if the GitHub number is bigger, it will overwrite the local version with the GitHub version.

Tech-How commented 1 year ago

Hi, thanks for the suggestion. I've just tested this, however it seems like this is a feature that is exclusive to other style managers, like Stylus. The Stylish extension doesn't respond to this type of information, at least in my testing. I may consider adding an option to install with Stylus in the future, as I know many people also use that extension. If so I will definitely keep this in mind.

Tech-How commented 1 year ago

All of my styles have been officially migrated to Userstyles.world and are now hosted there in addition to this GitHub page. There's a new button on the read me page that directs to the Userstyles page, which is done this way so that people who don't have the extension installed don't get confused by a plain text page from the install button.

Tech-How commented 1 month ago

Option to install as UserCSS directly from GitHub has been added.