Skip to content

Commit e9ab944

Browse files
committed
v3.9.18
Signed-off-by: Magic <magicoflolis@tuta.io>
1 parent fd8b3e4 commit e9ab944

75 files changed

Lines changed: 6029 additions & 1022 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.eslintrc.json

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,12 @@
22
"root": true,
33
"globals": {
44
"GM": "writable",
5-
"browser": "readonly",
6-
"chrome": "readonly",
5+
"err": "readonly",
6+
"boxCSS": "readonly",
7+
"main_css": "readonly",
8+
"custom_width": "readonly",
9+
"jaeFetchUserJSFrame": "readonly",
10+
"sleazyfork_redirect": "readonly",
711
"webext": "readonly",
812
"brws": "readonly"
913
},
@@ -19,14 +23,15 @@
1923
"prettier"
2024
],
2125
"parserOptions": {
26+
"ecmaVersion": "latest",
2227
"sourceType": "module",
2328
"allowImportExportEverywhere": false,
2429
"ecmaFeatures": {
2530
"globalReturn": true,
2631
"arrowFunctions": true,
2732
"modules": true
28-
},
29-
"ecmaVersion": "latest"
33+
}
3034
},
35+
"ignorePatterns": ["/src/header.js","/tools/userscript.js", "/dist/*.js"],
3136
"rules": {}
3237
}

README.md

Lines changed: 46 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,36 +2,41 @@
22

33
*Fork of [Userscript+ : Show Site All UserJS](https://github.com/jae-jae/Userscript-Plus#userscript). Source code & authors information found [here](https://github.com/jae-jae/Userscript-Plus).*
44

5-
> Finds available UserJS for current webpage.
5+
> Finds available UserJS for current webpage **( may not work on every webpage )**
6+
7+
## About
8+
9+
Finds available UserJS for current webpage from various UserJS hosts (e.g, [Greasy Fork](https://greasyfork.org)), displays a found count bottom right of the webpage, automatically disappears after 10 seconds (can be configured).
10+
11+
**Known bugs:**
12+
13+
* May conflict with any UserJS that executes in an iframe.
614

715
| Preview(s) |
816
|:----------:|
917
![Demo 1](https://raw.githubusercontent.com/magicoflolis/Userscript-Plus/master/asssets/demo3.gif)|
1018
![Demo 2](https://raw.githubusercontent.com/magicoflolis/Userscript-Plus/master/asssets/demo2.gif)|
1119
![Demo 3](https://raw.githubusercontent.com/magicoflolis/Userscript-Plus/master/asssets/demo1.png)|
20+
21+
## Downloads
22+
1223
***
1324

1425
| Version | Link | Alternative | Note |
1526
|:----------:|:----------:|:----------:|:----------:|
1627
Userscript | [Greasy Fork](https://greasyfork.org/scripts/421603) | [Install (GitHub)](https://github.com/magicoflolis/Userscript-Plus/releases/latest/download/magic-userjs.user.js) | -
17-
Userscript Legacy | [Install (GitHub)](https://cdn.jsdelivr.net/gh/magicoflolis/Userscript-Plus@master/archive/magic-userjs.user.js) | - | [Homepage](https://github.com/magicoflolis/Userscript-Plus)
28+
Userscript Legacy | [Install (GitHub)](https://cdn.jsdelivr.net/gh/magicoflolis/Userscript-Plus@master/archive/magic-userjs.user.js) | - | [Homepage](https://github.com/magicoflolis/Userscript-Plus/tree/master/archive)
1829
Chrome/Edge/Opera | [GitHub](https://github.com/magicoflolis/Userscript-Plus/releases) | - | Work in progress
1930
Firefox | [GitHub](https://github.com/magicoflolis/Userscript-Plus/releases) | [Add-on Store](https://addons.mozilla.org/firefox/addon/userscript-plus/) | Work in progress
2031

2132
**(Optional) Mobile Bookmarklet:**
2233

23-
> May not work on every webpage.
24-
2534
```JS
26-
javascript:(function(){['https://cdn.jsdelivr.net/gh/magicoflolis/Userscript-Plus@master/userscript/dist/magic-userjs.user.js'].map(s => document.body.appendChild(document.createElement('script')).src=s)})();
35+
javascript:(function(){['https://cdn.jsdelivr.net/gh/magicoflolis/Userscript-Plus@master/userscript/dist/magic-userjs.user.js'].map(s=>document.body.appendChild(document.createElement('script')).src=s)})();
2736
```
2837

2938
***
3039

31-
## About
32-
33-
Finds available UserJS for current webpage from various UserJS hosts (e.g, [Greasy Fork](https://greasyfork.org)), displays a found count bottom right of the webpage, automatically disappears after 10 seconds (can be configured).
34-
3540
## Features
3641

3742
> Tested and compatible with TamperMonkey and ViolentMonkey.
@@ -46,14 +51,41 @@ Finds available UserJS for current webpage from various UserJS hosts (e.g, [Grea
4651
* Available search engines: [Greasy Fork](https://greasyfork.org), [Sleazy Fork](https://sleazyfork.org), [Open UserJS](https://openuserjs.org), [GitHub](https://github.com/search?l=JavaScript&o=desc&q="==UserScript=="), [Gist (GitHub)](https://gist.github.com/search?l=JavaScript&o=desc&q="==UserScript==")
4752
* Built-in [Greasyfork Search with Sleazyfork Results include](https://greasyfork.org/scripts/23840).
4853

49-
## Known bugs
54+
## FAQ / Troubleshooting
55+
56+
Nothing appears bottom right:
57+
58+
* Try again on another webpage [[Test Page](https://google.com)]
59+
* Default timeout is 10000ms before the count disappears
60+
* If issue persists, see [Viewing UserJS Logs](#viewing-userjs-logs)
61+
62+
Error occured while injecting Container:
63+
64+
* Try again on another webpage [[Test Page](https://google.com)]
65+
* This error is caused by the current webpage not supporting [attachShadow](https://developer.mozilla.org/en-US/docs/Web/API/Element/attachShadow)
66+
67+
Error occured while loading UserJS for this webpage:
68+
69+
* Reload the webpage or try again on a different webpage [[Test Page](https://google.com)]
70+
* This error *may* be caused by
71+
* An error occured in an enabled search engine while fetching content
72+
* Script is unable to fetch content on current or all webpages
73+
74+
No available UserJS for this webpage:
75+
76+
* This error *can* be caused when no UserJS could be found in enabled search engines
77+
* If there are known UserJS to exist in enabled search engines, enable `Filter out other languages`
78+
79+
## Viewing UserJS Logs
5080

51-
* *May* conflict with any UserJS that runs in iframes.
52-
* *May* leave a opened tab when installing user scripts.
81+
* Open your web browsers Inspect Element and navigate to it's Console
82+
* Locate the following **[UserJS] < message >** ( you can filter your Console by entering **UserJS** or **[** )
83+
* Feel free to screenshot any error messages to the [GitHub](https://github.com/magicoflolis/Userscript-Plus/issues) for addition help
84+
* If nothing appears, this means the script is not executing at all
5385

54-
## Source Code
86+
### Source Code
5587

56-
* [https://github.com/magicoflolis/Userscript-Plus/tree/master/src](https://github.com/magicoflolis/Userscript-Plus/tree/master/src)
88+
* [https://github.com/magicoflolis/Userscript-Plus](https://github.com/magicoflolis/Userscript-Plus)
5789

5890
### Contacts
5991

archive/README.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# Magic Userscript+
2+
3+
*Fork of [Userscript+ : Show Site All UserJS](https://github.com/jae-jae/Userscript-Plus#userscript). Source code & authors information found [here](https://github.com/jae-jae/Userscript-Plus).*
4+
5+
> Finds available UserJS for current site.
6+
7+
| Preview(s) |
8+
|:----------:|
9+
![Preview](https://raw.githubusercontent.com/magicoflolis/Userscript-Plus/master/asssets/preview.png)|
10+
11+
***
12+
13+
| Version | Link | Alternative | Note |
14+
|:----------:|:----------:|:----------:|:----------:|
15+
Chrome / Edge | - | - | Work in progress
16+
Firefox | - | - | Work in progress
17+
Userscript | [Greasy Fork](https://greasyfork.org/scripts/421603) | [Install (GitHub)](https://github.com/magicoflolis/Userscript-Plus/releases/latest/download/magic-userjs.user.js) | -
18+
Userscript Legacy | [Install (GitHub)](https://cdn.jsdelivr.net/gh/magicoflolis/Userscript-Plus@master/archive/magic-userjs.user.js) | - | -
19+
20+
***
21+
22+
## Features
23+
24+
> DOES NOT WORK ON EVERY SINGLE SITE!
25+
26+
* Tested and compatible with TamperMonkey n ViolentMonkey.
27+
* Added [SleazyFork](https://sleazyfork.org).
28+
* Added built-in [Greasyfork Search with Sleazyfork Results include](https://greasyfork.org/scripts/23840).
29+
* Added ability to customize width.
30+
31+
```JS
32+
const sleazyfork_redirect = false, // 'true' to enable, 'false' to disable
33+
custom_width = '', // Default UserJS width: 90vw | Original UserJS width: 860px
34+
...
35+
```
36+
37+
## Known bugs
38+
39+
* *May* conflict with any UserJS that runs in iframes.
40+
* *May* leave a opened tab when installing user scripts.
41+
42+
## Source Code
43+
44+
* [https://github.com/magicoflolis/Userscript-Plus/tree/master/src](https://github.com/magicoflolis/Userscript-Plus/tree/master/src)
45+
46+
### Contacts
47+
48+
[GitHub](https://github.com/magicoflolis)
49+
50+
[Twitter](https://twitter.com/for_lollipops)
51+
52+
[Greasy Fork](https://greasyfork.org/users/166061)

archive/magic-userjs.user.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
// @downloadURL https://cdn.jsdelivr.net/gh/magicoflolis/Userscript-Plus@master/archive/magic-userjs.user.js
2020
// @updateURL https://cdn.jsdelivr.net/gh/magicoflolis/Userscript-Plus@master/archive/magic-userjs.user.js
2121
// @supportURL https://github.com/magicoflolis/Userscript-Plus/issues/new
22-
// @version 2.4.15
22+
// @version 2.4.16
2323
// @icon data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3ggEBCQHM3fXsAAAAVdJREFUOMudkz2qwkAUhc/goBaGJBgUtBCZyj0ILkpwAW7Bws4yO3AHLiCtEFD8KVREkoiFxZzX5A2KGfN4F04zMN+ce+5c4LMUgDmANYBnrnV+plBSi+FwyHq9TgA2LQpvCiEiABwMBtzv95RSfoNEHy8DYBzHrNVqVEr9BWKcqNFoxF6vx3a7zc1mYyC73a4MogBg7vs+z+czO50OW60Wt9stK5UKp9Mpj8cjq9WqDTBHnjAdxzGQZrPJw+HA31oulzbAWgLoA0CWZVBKIY5jzGYzdLtdE9DlcrFNrY98zobqOA6TJKHW2jg4nU5sNBpFDp6mhVe5rsvVasUwDHm9Xqm15u12o+/7Hy0gD8KatOd5vN/v1FozTVN6nkchxFuI6hsAAIMg4OPxMJCXdtTbR7JJCMEgCJhlGUlyPB4XfumozInrupxMJpRSRtZlKoNYl+m/6/wDuWAjtPfsQuwAAAAASUVORK5CYII=
2424
// @license MIT
2525
// @include *
@@ -72,7 +72,7 @@
7272
// @exclude *://*.*.*/options/*
7373
// @exclude *://*.*.*.gov/*
7474
// @exclude *://*.*.*/password_reset
75-
// @require https://greasyfork.org/scripts/23419-l-js/code/ljs.js
75+
// @require https://cdn.jsdelivr.net/gh/magicoflolis/Userscript-Plus@master/archive/ljs.js
7676
// @resource uiJs https://cdn.jsdelivr.net/gh/magicoflolis/Userscript-Plus@master/archive/ui.js
7777
// @resource count https://greasyfork.org/scripts/by-site.json
7878
// @resource adult https://sleazyfork.org/scripts/by-site.json
@@ -88,6 +88,7 @@
8888
// @run-at document-end
8989
// ==/UserScript==
9090

91+
// https://greasyfork.org/scripts/23419-l-js/code/ljs.js
9192
/**
9293
* Enable built-in "Greasyfork Search with Sleazyfork Results include"
9394
* 启用内置"使用 Sleazyfork 搜索"结果包括"
@@ -111,11 +112,9 @@
111112
} else {
112113
unsafeWindow.GmAjax = GM_xmlhttpRequest;
113114
};
114-
115-
/* eslint-disable no-undef */
116115
(() => {
117116
ljs.addAliases({
118-
jQuery:'https://cdn.jsdelivr.net/gh/jquery/jquery/dist/jquery.slim.min.js'
117+
jQuery:'https://cdn.jsdelivr.net/gh/jquery/jquery@3.6.1/dist/jquery.slim.min.js'
119118
});
120119
const win = self ?? window,
121120
doc = win.document,

archive/package.json

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
{
2+
"name": "uscript-plus-firefox",
3+
"productName": "Magic Userscript+ : Show Site All UserJS",
4+
"version": "2.4.14",
5+
"description": "Show current site all UserJS, the easier way to install UserJs for Tampermonkey.",
6+
"scripts": {
7+
"Dev:FF": "concurrently \"npm run Webpack:FF\" \"npm run Start:Sass\"",
8+
"Dev:Cr": "concurrently \"npm run Webpack:Cr\" \"npm run Start:Sass\"",
9+
"Dev:Userscript": "npm --prefix ./userscript run dev:Start",
10+
"Webpack:FF": "webpack --progress --mode development --config=tools/webpack.config.js --node-env firefox",
11+
"Webpack:Cr": "webpack --progress --mode development --config=tools/webpack.config.js --node-env chrome",
12+
"Start:Sass": "sass -w ./src/sass/magicuserjs.scss:./tests/compiled/magicuserjs.css -s compressed",
13+
"build:Firefox": "webpack --mode production --config=tools/webpack.config.js --node-env firefox",
14+
"build:Chrome": "webpack --mode production --config=tools/webpack.config.js --node-env chrome"
15+
},
16+
"devDependencies": {
17+
"@mdi/font": "^5.9.55",
18+
"@plasmo-corp/ewu": "^0.6.0",
19+
"@swc/cli": "^0.1.57",
20+
"@swc/core": "^1.2.204",
21+
"@types/psl": "^1.1.0",
22+
"autoprefixer": "^10.4.7",
23+
"concurrently": "^7.2.2",
24+
"copy-webpack-plugin": "^11.0.0",
25+
"crx3": "^1.1.3",
26+
"dotenv": "^16.0.1",
27+
"eslint-plugin-html": "^6.2.0",
28+
"path-browserify": "^1.0.1",
29+
"standard": "*",
30+
"swc-loader": "^0.2.3",
31+
"terser-webpack-plugin": "^5.3.3",
32+
"url-loader": "^4.1.1",
33+
"vue-loader": "^17.0.0",
34+
"vue-style-loader": ">=4.1.3",
35+
"vue-template-compiler": ">=2.6.14",
36+
"web-ext": "^7.0.0",
37+
"webpack": "^5.73.0",
38+
"webpack-cli": "^4.10.0",
39+
"webpack-merge": "^5.8.0"
40+
},
41+
"dependencies": {
42+
"animate.css": "^3.5.2",
43+
"css-loader": "^6.7.1",
44+
"fuzzy.js": "^0.1.0",
45+
"iview": "2.12.0",
46+
"style-loader": "^3.3.1",
47+
"timeago.js": "^4.0.2",
48+
"vue": "^3.2.37",
49+
"vue-i18n": ">=9.1.10"
50+
},
51+
"author": "Magic <magicoflolis@tuta.io>",
52+
"license": "MIT",
53+
"bugs": {
54+
"url": "https://github.com/magicoflolis/Userscript-Plus/issues/new"
55+
},
56+
"repository": "git+https://github.com/magicoflolis/Userscript-Plus.git",
57+
"keywords": [
58+
"userscript",
59+
"userjs",
60+
"tampermonkey"
61+
],
62+
"homepage": "https://github.com/magicoflolis/Userscript-Plus",
63+
"webExt": {
64+
"sourceDir": "./dist/extension/",
65+
"artifactsDir": "./build/"
66+
},
67+
"standard": {
68+
"ignore": [
69+
"user.js"
70+
]
71+
}
72+
}

archive/src/html/background.html

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<meta charset="utf-8">
5+
<title>MagicUserJS</title>
6+
</head>
7+
<body>
8+
<script src="web_accessible_resources/psl.min.js"></script>
9+
<script src="js/background.js" type="module"></script>
10+
</body>
11+
</html>

archive/src/html/options.html

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
<!DOCTYPE html>
2+
<html lang="en" style="background-color: #202023;color: #e8eaed;">
3+
<head>
4+
<meta charset="utf-8"/>
5+
<title>UserJS - Options</title>
6+
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1">
7+
<link rel="icon" sizes="any" type="image/png" href="/img/icon_96.png">
8+
<link rel="stylesheet" href="css/magicuserjs.css" />
9+
</head>
10+
<body class="userjs-options">
11+
<form>
12+
<section class="select">
13+
<span>Theme</span>
14+
<select name="theme">
15+
<option disabled value="light">Light</option>
16+
<option value="dark">Dark</option>
17+
</select>
18+
</section>
19+
<section class="checkbox">
20+
<label>
21+
<span>Enable "Greasyfork Search with Sleazyfork Results include"</span>
22+
<div class="switch">
23+
<input type="checkbox" name="sleazyfork" id="sleazyfork" />
24+
<label for="sleazyfork"></label>
25+
</div>
26+
</label>
27+
</section>
28+
</form>
29+
<script src="js/options.js"></script>
30+
</body>
31+
32+
</html>

archive/src/html/popup.html

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<!DOCTYPE html>
2+
<html>
3+
4+
<head>
5+
<meta charset="utf-8">
6+
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1">
7+
<title>UserJS - Popup</title>
8+
<link rel="stylesheet" href="web_accessible_resources/iview.css" />
9+
</head>
10+
11+
<body class="userjs-popup">
12+
<div id="app">
13+
14+
</div>
15+
<script src="js/start.js"></script>
16+
<!-- <script src="web_accessible_resources/psl.min.js"></script> -->
17+
<!-- <script src="js/popup.js"></script> -->
18+
</body>
19+
20+
</html>

archive/src/html/ui.html

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<!DOCTYPE html>
2+
<html>
3+
4+
<head>
5+
<meta charset="utf-8">
6+
<meta name="viewport" content="width=device-width, initial-scale=1">
7+
<title>Show Site All UserJS</title>
8+
</head>
9+
10+
<body style="background: none transparent">
11+
<div id="app">
12+
13+
</div>
14+
15+
</body>
16+
17+
</html>

archive/src/img/icon_128.png

9.93 KB
Loading

0 commit comments

Comments
 (0)