- Better Opennet script - 0.2.0
- Better Youtube script - 0.0.2
- Better habr script - 0.4.2
- Better rezka script - 2.1.0
- Github files resolver script - 1.2.0
- Markdown tools script - 0.4.2
- Media Speed - 0.2.2
- Pikabu tabs - 0.0.1
- https://wiki.greasespot.net/Metadata_Block
- https://www.tampermonkey.net/documentation.php#_match
- https://openuserjs.org/
- https://greasyfork.org/
- https://simply-how.com/enhance-and-fine-tune-any-web-page-the-complete-user-scripts-guide#section-3
- 4pda style - 0.1.0
- acomics style - 0.0.1
- adme style - 0.0.2
- dcealopez style - 0.0.1
- feedly style - 0.0.4
- free-freecell-solitair style - 0.0.1
- free-play-sudoku style - 0.0.1
- github style - 0.0.3
- kinopoisk style - 0.0.1
- rezka style - 0.3.0
- rollbar style - 0.0.1
- seasonvar style - 1.1.0
- tprogger style - 1.0.0
- whatsapp style - 0.0.1
- youtube style - 0.3.1
- https://github.com/openstyles/stylus/wiki/Usercss
- https://github.com/openstyles/stylus/wiki/Writing-UserCSS
For making template Cookiecutter is used. Install cookiecutter and make new template:
pip install cookiecutter
or
pipx install cookiecutter
References:
- https://cookiecutter.readthedocs.io/en/stable/overview.html
- https://github.com/audreyfeldroy/cookiecutter-pypackage
$ make user_script
name [Custom Script]: some site
slug [some_site]:
namespace [ilyachch/userscripts/user_scripts]:
version [0.0.1]:
description [Custom Script - some site]:
license [MIT]:
repository_name [ilyachch/userscripts]:
author [ilyachch (https://github.com/ilyachch/userscripts)]:
Select run_at:
1 - document-end
2 - document-start
3 - document-body
4 - document-idle
5 - context-menu
Choose from 1, 2, 3, 4, 5 [1]:
match [*://*/*]:
icon []:
noframes [False]:
unwrap [False]:
antifeature_ads [False]:
antifeature_tracking [False]:
antifeature_miner [False]:
separate_css [False]: True
This will create a folder with the name some_site
and a files some_site.user.js
, some_site.user.css
in it:
userscripts/some_site/
├── some_site.user.css
└── some_site.user.js
// ==UserScript==
// @name some site script
// @namespace ilyachch/userscripts
// @version 0.0.1
// @description Custom Script - some site
// @author ilyachch (https://github.com/ilyachch/userscripts)
// @homepageURL https://github.com/ilyachch/userscripts
// @source https://github.com/ilyachch/userscripts/blob/main/userscripts/some_site/some_site.user.js
// @supportURL https://github.com/ilyachch/userscripts/issues
// @updateURL https://raw.githubusercontent.com/ilyachch/userscripts/main/userscripts/some_site/some_site.user.js
// @downloadURL https://raw.githubusercontent.com/ilyachch/userscripts/main/userscripts/some_site/some_site.user.js
// @license MIT
// @run-at document-end
// @match *://*/*
// @resource styles https://raw.githubusercontent.com/ilyachch/userscripts/main/userscripts/some_site/some_site.user.css
// @grant GM_addStyle
// @grant GM_getResourceText
// ==/UserScript==
// https://github.com/greasemonkey/gm4-polyfill
if (typeof GM_addStyle === "undefined") {
GM_addStyle = (aCss) => {
"use strict";
let head = document.getElementsByTagName("head")[0];
if (head) {
let style = document.createElement("style");
style.setAttribute("type", "text/css");
style.textContent = aCss;
head.appendChild(style);
return style;
}
return null;
};
}
if (typeof GM_getResourceText === "undefined") {
fetch(
"https://raw.githubusercontent.com/ilyachch/userscripts/main/userscripts/some_site/some_site.user.css"
).then((response) => response.text().then((styles) => GM_addStyle(styles)));
} else {
const styles = GM_getResourceText("styles");
GM_addStyle(styles);
}
(function () {
"use strict";
// Your code here...
})();
$ make user_script
name [Custom Script]: some site
slug [some_site]:
namespace [ilyachch/userscripts/user_scripts]:
version [0.0.1]:
description [Custom Script - some site]:
license [MIT]:
repository_name [ilyachch/userscripts]:
author [ilyachch (https://github.com/ilyachch/userscripts)]:
Select run_at:
1 - document-end
2 - document-start
3 - document-body
4 - document-idle
5 - context-menu
Choose from 1, 2, 3, 4, 5 [1]:
match [*://*/*]:
icon []:
noframes [False]:
unwrap [False]:
antifeature_ads [False]:
antifeature_tracking [False]:
antifeature_miner [False]:
separate_css [False]:
This will create a folder with the name some_site
and a file some_site.user.js
in it:
userscripts/some_site/
└── some_site.user.js
// ==UserScript==
// @name some site script
// @namespace ilyachch/userscripts
// @version 0.0.1
// @description Custom Script - some site
// @author ilyachch (https://github.com/ilyachch/userscripts)
// @homepageURL https://github.com/ilyachch/userscripts
// @source https://github.com/ilyachch/userscripts/blob/main/userscripts/some_site/some_site.user.js
// @supportURL https://github.com/ilyachch/userscripts/issues
// @updateURL https://raw.githubusercontent.com/ilyachch/userscripts/main/userscripts/some_site/some_site.user.js
// @downloadURL https://raw.githubusercontent.com/ilyachch/userscripts/main/userscripts/some_site/some_site.user.js
// @license MIT
// @run-at document-end
// @match *://*/*
// ==/UserScript==
const css = ``
let style = document.createElement('style');
style.innerHTML = css;
document.head.appendChild(style);
(function () {
"use strict";
// Your code here...
})();
$ make user_style
name [Custom CSS]: some site
slug [some_site]:
namespace [ilyachch/userscripts]:
version [0.0.1]:
description [Custom CSS - some site]:
license [MIT]:
Select preprocessor:
1 - default
2 - uso
3 - less
4 - stylus
Choose from 1, 2, 3, 4 [1]:
repository_name [ilyachch/userscripts]:
update_url [https://raw.githubusercontent.com/ilyachch/userscripts/main/usercss/some_site/some_site.user.css]:
author [ilyachch (https://github.com/ilyachch/userscripts)]:
Select filter_by:
1 - domain
2 - url
3 - url-prefix
4 - regexp
Choose from 1, 2, 3, 4 [1]:
This will create a folder with the name some_site
and a file some_site.user.css
in it:
usercss/some_site/
└── some_site.user.css
/* ==UserStyle==
@name some site style
@namespace ilyachch/userscripts/styles
@version 0.0.1
@description Custom CSS - some site
@author ilyachch (https://github.com/ilyachch/userscripts)
@homepageURL https://github.com/ilyachch/userscripts
@supportURL https://github.com/ilyachch/userscripts/issues
@updateURL https://raw.githubusercontent.com/ilyachch/userscripts/main/usercss/some_site/some_site.user.css
@license MIT
@preprocessor default
==/UserStyle== */
@-moz-document domain("some_site") {
/* Your CSS goes here */
}
You should change author
while creating a new style. Also you should change domain("some_site")
.
Command:
$ name=some_site make simple_user_style
This will create a folder with the name some_site
and a file some_site.user.css
in it:
usercss/some_site/
└── some_site.user.css
/* ==UserStyle==
@name some_site style
@namespace ilyachch/userscripts/styles
@version 0.0.1
@description Custom CSS - some_site
@author ilyachch (https://github.com/ilyachch/userscripts)
@homepageURL https://github.com/ilyachch/userscripts
@supportURL https://github.com/ilyachch/userscripts/issues
@updateURL https://raw.githubusercontent.com/ilyachch/userscripts/main/usercss/some_site/some_site.user.css
@license MIT
@preprocessor default
==/UserStyle== */
@-moz-document domain("some_site") {
/* Your CSS goes here */
}
You should change @author
and domain("some_site")
.
make readme
this will update README.md
with new scripts and styles links.