Github Repository Tab Creator

Template Script to Create your own Repository Tab

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

Аўтар
Der_Floh
Усталяванняў за дзень
0
Усяго ўсталяванняў
1
Рэйтынг
0 0 0
Версія
1.0.1
Створаны
16.06.2023
Абноўлены
15.09.2023
Памер
6.5 КБ
Ліцэнзія
MIT
Ужываецца на

This script is a template to create your own github repository tabs nice and simply. In the script is an example tab which does not work but provides the basic layout of how you can add your own tab.

Please use this code in your own NEW Script, because if this gets updated your custom code might be overwritten.

This shows how you can add a tab:

const name = "EXAMPLE-NAME"; // <-- Name for the tab (has to be something)
const icon = "https://somewebsite/EXAMPLE-ICON.png"; // <-- icon to use for the tab (possible: image link, svg string, html element, empty for no icon)
createTabElem(name, icon, (event) => {
  const currentLocation = window.location.toString();
  const subpage = "EXAMPLE-SUBPAGE"; // <-- Subpage to navigate to (for example https://github.com/username/repositoryname/SUBPAGE)
  const link = `/${getUsername(currentLocation)}/${getRepositoryname(currentLocation)}/${subpage}`;
  window.location.href = link;
});
  • If you want a working example comment out this code and remove the comment (/* and */) for the working example.
  • If you don't want to use a subpage feel free to add your own code into the event for the tab.

The working example is also used in the Github Stargazers Script

If there are suggestions for improvements, or you found a bug feel free to give me Feedback here