Skip to content

Commit f9ffe59

Browse files
committed
Restructured
Signed-off-by: Magic <magicoflolis@tuta.io>
1 parent c07da2b commit f9ffe59

115 files changed

Lines changed: 4906 additions & 52229 deletions

File tree

Some content is hidden

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

.editorconfig

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
root = true
2-
charset = utf-8
3-
4-
trim_trailing_whitespace = true
52

63
[*]
7-
end_of_line = lf
8-
insert_final_newline = true
4+
charset = utf-8
95
indent_style = space
106
indent_size = 2
7+
end_of_line = lf
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true

.eslintignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
/src/header.js
2+
src/header.js
3+
header.js
4+
5+
/tools/userscript.js
6+
tools/userscript.js
7+
userscript.js

.eslintrc.json

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"root": true,
3+
"globals": {
4+
"GM": "writable",
5+
"browser": "readonly",
6+
"chrome": "readonly",
7+
"webext": "readonly",
8+
"brws": "readonly"
9+
},
10+
"env": {
11+
"browser": true,
12+
"es2021": true,
13+
"greasemonkey": true,
14+
"jquery": true,
15+
"node": true
16+
},
17+
"extends": [
18+
"eslint:recommended",
19+
"prettier"
20+
],
21+
"parserOptions": {
22+
"sourceType": "module",
23+
"allowImportExportEverywhere": false,
24+
"ecmaFeatures": {
25+
"globalReturn": true,
26+
"arrowFunctions": true,
27+
"modules": true
28+
},
29+
"ecmaVersion": "latest"
30+
},
31+
"rules": {}
32+
}

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ jspm_packages/
99
.vscode/.history
1010

1111
*.bak
12-
*.code-workspace
1312
*.web-extension-id
1413
web-ext-artifacts
1514
web-ext

.swcrc

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"jsc": {
3+
"parser": {
4+
"syntax": "ecmascript"
5+
},
6+
"target": "es2020"
7+
},
8+
"module": {
9+
"type": "es6"
10+
}
11+
}

.vscode/launch.json

Lines changed: 31 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,34 @@
11
{
2-
"version": "0.2.0",
3-
"compounds": [
4-
{
5-
"name": "Attach/Launch",
6-
"configurations": ["Attach:Firefox", "Start:Firefox"]
7-
}
8-
],
9-
"configurations": [
10-
{
11-
"name": "Attach:Firefox",
12-
"type": "firefox",
13-
"request": "attach",
14-
},
2+
"version": "0.2.0",
3+
"compounds": [
4+
{
5+
"name": "Attach/Launch",
6+
"configurations": ["Attach:Firefox", "Start:Firefox"]
7+
}
8+
],
9+
"configurations": [
10+
{
11+
"name": "Attach:Firefox",
12+
"type": "firefox",
13+
"request": "attach",
14+
},
15+
{
16+
"name": "SF",
17+
"type": "firefox",
18+
"request": "launch",
19+
"clearConsoleOnReload": true,
20+
"reAttach": true,
21+
"reloadOnAttach": true,
22+
"keepProfileChanges": false,
23+
"reloadOnChange": "${workspaceFolder}/src/js/**",
24+
"url": "https://www.google.com/",
25+
"addonPath": "${workspaceFolder}\\tests\\firefox",
26+
"pathMappings": [
1527
{
16-
"name": "Start:Firefox",
17-
"type": "firefox",
18-
"request": "launch",
19-
"reAttach": true,
20-
"reloadOnAttach": true,
21-
"keepProfileChanges": false,
22-
"clearConsoleOnReload": true,
23-
"url": "https://www.google.com/",
24-
"addonPath": "${workspaceFolder}\\dist\\extension",
25-
"reloadOnChange": {
26-
"watch": [ "${workspaceFolder}/dist/extension/js/*.js" ],
27-
"ignore": [ "${workspaceFolder}/node_modules/**" ]
28+
"url": "webpack:///js",
29+
"path": "${workspaceFolder}/src/js"
2830
}
29-
}
30-
]
31-
}
31+
]
32+
}
33+
]
34+
}

README.md

Lines changed: 10 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,25 @@
11
# Magic Userscript+
22

3-
> [09/09/21] Greasy Fork version may not work due to userscript library being removed. Use [GitHub](https://raw.githubusercontent.com/magicoflolis/Userscript-Plus/master/dist/magic-userjs.user.js) version for now.
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).*
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).*
64

75
> Finds available UserJS for current site.
86
9-
![Preview](https://raw.githubusercontent.com/magicoflolis/Userscript-Plus/master/resources/preview.png)
7+
| Preview(s) |
8+
|:----------:|
9+
![Preview](https://raw.githubusercontent.com/magicoflolis/Userscript-Plus/master/resources/preview.png)|
1010

1111
***
1212

13-
| Version | Link | Note | Alternative | Build |
14-
|:----------:|:----------:|:----------:|:----------:|:----------:|
15-
Chrome | ~~Install [Chrome Web Store]~~ | **There are no excluded websites, use at your own risk.** *Must be installed [manually](#manual-install).* | [Install [GitHub]](https://github.com/magicoflolis/Userscript-Plus/releases) | [Extension](#build-setup)
16-
Firefox | [Install [Firefox Add-ons]](https://addons.mozilla.org/addon/userscript-plus) | **There are no excluded websites, use at your own risk.** *Can be installed [manually](#manual-install).* | [Install [GitHub]](https://github.com/magicoflolis/Userscript-Plus/releases) | [Add-on](#build-setup)
17-
Userscript | [Install [GitHub]](https://raw.githubusercontent.com/magicoflolis/Userscript-Plus/master/dist/magic-userjs.user.js) | The userscript **WON'T** work for all websites, [info](#known-bugs). | [Install [Greasy Fork]](https://greasyfork.org/scripts/421603) | [Userscript](#build-setup)
13+
| Version | Link | Alternative | Note |
14+
|:----------:|:----------:|:----------:|:----------:|
15+
Chrome / Edge | - | - | Work in progress
16+
Firefox | - | - | Work in progress
17+
Userscript | [Install (GitHub)](https://github.com/magicoflolis/Userscript-Plus/releases/latest/download/magic-userjs.user.js) | [Greasy Fork](https://greasyfork.org/scripts/421603) | -
1818

1919
***
2020

2121
## Features
2222

23-
**_Optional_** *install [Greasyfork Search with Sleazyfork Results include](https://greasyfork.org/scripts/23840).*
24-
25-
> Currently [Userscript+](https://github.com/jae-jae/Userscript-Plus#userscript) can only find userscripts through __GreasyFork__, I've added support for __SleazyFork__ along with a few additional features and tweaks!
26-
2723
* Tested and compatible with TamperMonkey n ViolentMonkey.
2824
* Trimmed / moved some @resources to this build.
2925
* Added [SleazyFork](https://sleazyfork.org).
@@ -44,64 +40,9 @@ let sleazyfork_redirect = false; // "true" to enable, "false" to disable
4440

4541
> **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.
4642
47-
## Manual Install
48-
49-
Chromium
50-
51-
* Download and unzip [latest release](https://github.com/magicoflolis/Userscript-Plus/releases) into desired folder.
52-
* Go to chromium/chrome *Extensions*.
53-
* Click to check *Developer mode*.
54-
* Click *Load unpacked extension...*.
55-
* In the file selector dialog:
56-
* Select the directory `userscript_for_tampermonkey-*` / desired folder.
57-
* Click *Open*.
58-
59-
Firefox
60-
61-
> See: [Temporary installation in Firefox](https://extensionworkshop.com/documentation/develop/temporary-installation-in-firefox)
62-
63-
* Download and unzip [latest release](https://github.com/magicoflolis/Userscript-Plus/releases) into desired folder.
64-
* Copy and paste `about:debugging#/runtime/this-firefox` into your URL.
65-
* Click *Load Temporary Add-on…*.
66-
* In the file selector dialog:
67-
* Select the directory `userscript_for_tampermonkey-*` / desired folder.
68-
* Click *Open*.
69-
70-
## Build Setup
71-
72-
> Developed using [VSCodium](https://vscodium.com).
73-
74-
| Help Links |
75-
|:----------:|
76-
[web-ext documentation](https://extensionworkshop.com/documentation/develop/getting-started-with-web-ext/) |
77-
[http-server](https://github.com/http-party/http-server) |
78-
[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) |
79-
80-
```bash
81-
# Install dependencies ( if error use npm i --force )
82-
npm i
83-
# [ Production ] Builds both User Script and Browser Extension
84-
npm run build:all
85-
# [ Development ] User Script
86-
# Recommend bookmarking for faster deployment
87-
# http://localhost:8080/magic-userjs.user.js
88-
npm run dev:user
89-
npm run http-server
90-
# [ Development ] Browser Extension
91-
# For Firefox use web-ext
92-
# Recommended to create additional profile about:profiles
93-
web-ext run -p <profile>
94-
npm run dev:browser
95-
# For Chrome load unpacked, REPLACE manifest.json with chrome-manifest.json
96-
```
97-
9843
## Source Code
9944

100-
* [GitHub](https://github.com/magicoflolis/Userscript-Plus)
101-
102-
### License
103-
104-
MIT
45+
* [GitHub](https://github.com/magicoflolis/Userscript-Plus/src)
10546

10647
### Contacts
10748

Userscript-Plus.code-workspace

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{
2+
"folders": [
3+
{
4+
"path": "."
5+
}
6+
],
7+
"settings": {
8+
"search.exclude": {
9+
"**/node_modules": true,
10+
"**/chrome_dist/js": true,
11+
"**/dist/js": true
12+
},
13+
"editor.formatOnSaveMode": "modifications",
14+
"files.trimTrailingWhitespace": true,
15+
"files.associations": {
16+
".eslintrc": "jsonc"
17+
},
18+
"editor.codeActionsOnSave": {
19+
"source.fixAll": false,
20+
"source.fixAll.eslint": true
21+
},
22+
"local-history.daysLimit": 7,
23+
"local-history.maxDisplay": 10,
24+
"local-history.saveDelay": 0,
25+
"local-history.dateLocale": "en-US",
26+
"local-history.exclude": [
27+
"**/.history/**",
28+
"**/.vscode/**",
29+
"**/node_modules/**",
30+
"**/dist/**",
31+
"**/chrome_dist/**",
32+
"**/build/**",
33+
"**/*.code-workspace",
34+
"**/src/sass/**",
35+
],
36+
"local-history.path": "${workspaceFolder}/.vscode",
37+
}
38+
}

dist/extension/background.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<title>MagicUserJS</title>
66
</head>
77
<body>
8-
<script 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>
1111
</html>

0 commit comments

Comments
 (0)