Skip to content

Commit 3bb99c6

Browse files
committed
Hotfix
Signed-off-by: magicoflolis <magicoflolis@gmail.com>
1 parent e99ecf6 commit 3bb99c6

36 files changed

Lines changed: 1760 additions & 672 deletions

README.md

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,7 @@ Firefox
7575

7676
* [ All ] May leave a opened tab when installing User Scripts.
7777
* [ User Script ] Found count may not appear.
78-
* [ User Script ] Script pages can't be opened with SleazyFork results.
79-
* [ User Script ] In some sites below the plug-in interface icon is not displayed,Such as: Github
78+
* [ User Script ] In some sites below the plug-in interface icon is not displayed
8079

8180
> **Reason**:This is because the security policy of these sites to prevent the plug-in icon font file loading, resulting in the icon does not display properly.
8281
@@ -106,8 +105,6 @@ npm run dev:browser
106105
# For Chrome load unpacked, REPLACE manifest.json with chrome-manifest.json
107106
```
108107

109-
> Source code is a bit of a mess right now
110-
111108
## License
112109

113110
MIT
@@ -118,4 +115,4 @@ MIT
118115

119116
[Twitter](https://twitter.com/for_lollipops)
120117

121-
[Greasy Fork](https://greasyfork.org/users/166061)
118+
[Greasy Fork](https://greasyfork.org/users/166061)

README.zh.md

Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
# Magic Userscript+
2+
3+
> Finds available UserJS for current site.
4+
5+
*Fork of [Userscript+ : Show Site All UserJS](https://greasyfork.org/scripts/24508-userscript-show-site-all-userjs). Source code & authors information found [here](https://github.com/jae-jae/Userscript-Plus#userscript).*
6+
7+
## Features
8+
9+
*Recommended to install ["Greasyfork Search with Sleazyfork Results include"](https://greasyfork.org/scripts/23840)*
10+
11+
> Currently [Userscript+](https://github.com/jae-jae/Userscript-Plus#userscript) can only find userscripts through [GreasyFork](https://greasyfork.org), I've added support for [SleazyFork](https://sleazyfork.org) along with a few additional features and tweaks!
12+
13+
* Tested and compatible with TamperMonkey n ViolentMonkey.
14+
* Trimmed / moved some @resources to this build.
15+
* Added [SleazyFork](https://sleazyfork.org).
16+
* Added Dark Theme.
17+
* Added extra @excludes.
18+
* Added built-in ["Greasyfork Search with Sleazyfork Results include"](https://greasyfork.org/scripts/23840)
19+
20+
```bash
21+
let sleazyfork_redirect = false; // "true" to enable, "false" to disable
22+
```
23+
24+
![Preview](https://raw.githubusercontent.com/magicoflolis/Userscript-Plus/master/resources/preview.png)
25+
26+
***
27+
28+
**Chrome:**
29+
30+
> **There are no excluded websites, use at your own risk.**
31+
32+
* ~~Chrome Web Store~~
33+
* [GitHub Releases](https://github.com/magicoflolis/Userscript-Plus/releases)
34+
35+
**Firefox:**
36+
37+
> **There are no excluded websites, use at your own risk.**
38+
39+
* [Add-ons web site](https://addons.mozilla.org/firefox/addon/userscript-plus)
40+
* [GitHub Releases](https://github.com/magicoflolis/Userscript-Plus/releases)
41+
42+
**User Script:**
43+
44+
> The userscript **WON'T** work for all websites, [info.](#known-bugs)
45+
46+
* [Greasy Fork](https://greasyfork.org/scripts/421603)
47+
* [GitHub Direct Link](https://github.com/magicoflolis/Userscript-Plus/raw/master/dist/magic-userjs.user.js)
48+
49+
**Manual:**
50+
51+
Chromium
52+
53+
* Download and unzip [latest release](https://github.com/magicoflolis/Userscript-Plus/releases) into desired folder.
54+
* Go to chromium/chrome *Extensions*.
55+
* Click to check *Developer mode*.
56+
* Click *Load unpacked extension...*.
57+
* In the file selector dialog:
58+
* Select the directory `userscript_for_tampermonkey-*` / desired folder.
59+
* Click *Open*.
60+
61+
Firefox
62+
63+
> See: [Temporary installation in Firefox](https://extensionworkshop.com/documentation/develop/temporary-installation-in-firefox)
64+
65+
* Download and unzip [latest release](https://github.com/magicoflolis/Userscript-Plus/releases) into desired folder.
66+
* Copy and paste `about:debugging#/runtime/this-firefox` into your URL.
67+
* Click *Load Temporary Add-on…*.
68+
* In the file selector dialog:
69+
* Select the directory `userscript_for_tampermonkey-*` / desired folder.
70+
* Click *Open*.
71+
72+
***
73+
74+
## Known bugs
75+
76+
* [ All ] May leave a opened tab when installing User Scripts.
77+
* [ User Script ] Found count may not appear.
78+
* [ User Script ] In some sites below the plug-in interface icon is not displayed
79+
80+
> **Reason**:This is because the security policy of these sites to prevent the plug-in icon font file loading, resulting in the icon does not display properly.
81+
82+
## Build Setup
83+
84+
> Additional help
85+
86+
* [web-ext documentation](https://extensionworkshop.com/documentation/develop/getting-started-with-web-ext/)
87+
* [http-server](https://github.com/http-party/http-server)
88+
* [How to edit scripts with your favorite editor?](https://violentmonkey.github.io/posts/how-to-edit-scripts-with-your-favorite-editor/#install-a-local-script)
89+
90+
```bash
91+
# Install dependencies ( if error use npm i --force )
92+
npm i
93+
# [ Production ] Builds both User Script and Browser Extension
94+
npm run build:all
95+
# [ Development ] User Script
96+
# Recommend bookmarking for faster deployment
97+
# http://localhost:8080/magic-userjs.user.js
98+
npm run dev:user
99+
npm run http-server
100+
# [ Development ] Browser Extension
101+
# For Firefox use web-ext
102+
# Recommended to create additional profile about:profiles
103+
web-ext run -p <profile>
104+
npm run dev:browser
105+
# For Chrome load unpacked, REPLACE manifest.json with chrome-manifest.json
106+
```
107+
108+
## License
109+
110+
MIT
111+
112+
### Contacts
113+
114+
[GitHub](https://github.com/magicoflolis)
115+
116+
[Twitter](https://twitter.com/for_lollipops)
117+
118+
[Greasy Fork](https://greasyfork.org/users/166061)

dist/chrome-manifest.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
{
1111
"all_frames": true,
1212
"js": ["/js/sleazyfork.js"],
13-
"matches": ["https://*.greasyfork.org/*", "https://*.sleazyfork.org/*"],
13+
"matches": ["https://greasyfork.org/*/scripts/*", "https://sleazyfork.org/*/scripts/*"],
1414
"run_at": "document_end"
1515
}
1616
],
@@ -23,7 +23,7 @@
2323
"options_ui": {
2424
"browser_style": false,
2525
"page": "options.html",
26-
"open_in_tab": false
26+
"open_in_tab": true
2727
},
2828
"background": {
2929
"page": "background.html"
@@ -43,4 +43,4 @@
4343
"unlimitedStorage"
4444
],
4545
"short_name": "uScriptPlus"
46-
}
46+
}

dist/extension/background.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
<html>
33
<head>
44
<meta charset="utf-8">
5-
<title>UserJS</title>
5+
<title>MagicUserJS</title>
66
</head>
77
<body>
8-
<script type="text/javascript" src="./js/psl.min.js"></script>
9-
<script src="./js/background.js"></script>
8+
<script src="./js/psl.min.js"></script>
9+
<script src="./js/background.js"></script>
1010
</body>
11-
</html>
11+
</html>

dist/extension/css/options.css

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
:root {
2+
background-color: #202023;
3+
color: #e8eaed;
4+
width: 100%;
5+
height: 100%;
6+
}
7+
18
body,
29
html {
310
padding: 0;
@@ -90,7 +97,7 @@ section.checkboxlist p {
9097
background-color: #8AB4F8;
9198
}
9299

93-
@media (prefers-color-scheme: dark) {
100+
/* @media (prefers-color-scheme: dark) {
94101
:root {
95102
background-color: #202023;
96103
color: #e8eaed;
@@ -99,4 +106,4 @@ section.checkboxlist p {
99106
section:not(:first-child) {
100107
border-top: 1px solid #4c4c4e;
101108
}
102-
}
109+
} */

dist/extension/js/background.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,7 @@ const countApi = "https://greasyfork.org/scripts/by-site.json",
2424
getUrlHost = (url) => {
2525
let a = document.createElement("a");
2626
a.href = url;
27-
let mainHost =
28-
psl.get(a.hostname) ||
29-
a.hostname.split(".").splice(-2).join(".");
27+
let mainHost = psl.get(a.hostname) || a.hostname.split(".").splice(-2).join(".");
3028
return mainHost;
3129
},
3230
changeBadge = (cData) => {

dist/extension/js/options.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/extension/js/options.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)