File tree Expand file tree Collapse file tree 3 files changed +46
-0
lines changed
userscripts/http-redirect-enforcer Expand file tree Collapse file tree 3 files changed +46
-0
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ My user scripts to add functionality to various sites around the web (that were
9
9
- [ GitHub Gist - CodeMirror Resizer] ( ./userscripts/github-gist-codemirror-resizer/ ) ([ Install] ( https://github.com/0xdevalias/userscripts/raw/main/userscripts/github-gist-codemirror-resizer/github-gist-codemirror-resizer.user.js ) )
10
10
- [ GitHub Notifications - Arrow key navigation] ( ./userscripts/github-notifications-arrow-key-navigation/ ) ([ Install] ( https://github.com/0xdevalias/userscripts/raw/main/userscripts/github-notifications-arrow-key-navigation/github-notifications-arrow-key-navigation.user.js ) )
11
11
- [ Google developer sites - Ensure ?authuser= by default] ( ./userscripts/google-developer-sites-ensure-authuser/ ) ([ Install] ( https://github.com/0xdevalias/userscripts/raw/main/userscripts/google-developer-sites-ensure-authuser/google-developer-sites-ensure-authuser.user.js ) )
12
+ - [ HTTP Redirect Enforcer (for specific sites)] ( ./userscripts/http-redirect-enforcer/ ) ([ Install] ( https://github.com/0xdevalias/userscripts/raw/main/userscripts/http-redirect-enforcer/http-redirect-enforcer.user.js ) )
12
13
- [ Nourishd Meal Highlighter] ( ./userscripts/nourishd-meal-highlighter/ ) ([ Install] ( https://github.com/0xdevalias/userscripts/raw/main/userscripts/nourishd-meal-highlighter/nourishd-meal-highlighter.user.js ) )
13
14
- [ YouTube Speed Override] ( ./userscripts/youtube-speed-override/ ) ([ Install] ( https://github.com/0xdevalias/userscripts/raw/main/userscripts/youtube-speed-override/youtube-speed-override.user.js ) )
14
15
Original file line number Diff line number Diff line change
1
+ # HTTP Redirect Enforcer (for specific sites)
2
+
3
+ ``` javascript
4
+ // ==UserScript==
5
+ // @name HTTP Redirect Enforcer (for specific sites)
6
+ // @description Ensures the use of HTTP instead of HTTPS on sites that normally redirect via HTTP
7
+ // @author Glenn 'devalias' Grant (devalias.net)
8
+ // @homepageURL https://github.com/0xdevalias/userscripts
9
+ // @supportURL https://github.com/0xdevalias/userscripts/issues
10
+ // @downloadURL https://github.com/0xdevalias/userscripts/raw/main/userscripts/http-redirect-enforcer/http-redirect-enforcer.user.js
11
+ // @namespace https://www.devalias.net/
12
+ // @version 0.1
13
+ // @run-at document-start
14
+ // @match https://mail.ensquared.net/*
15
+ // @match https://mail.devalias.net/*
16
+ // @grant none
17
+ // ==/UserScript==
18
+ ```
19
+
20
+ - [ Install] ( https://github.com/0xdevalias/userscripts/raw/main/userscripts/http-redirect-enforcer/http-redirect-enforcer.user.js )
Original file line number Diff line number Diff line change
1
+ // ==UserScript==
2
+ // @name HTTP Redirect Enforcer (for specific sites)
3
+ // @description Ensures the use of HTTP instead of HTTPS on sites that normally redirect via HTTP
4
+ // @author Glenn 'devalias' Grant (devalias.net)
5
+ // @homepageURL https://github.com/0xdevalias/userscripts
6
+ // @supportURL https://github.com/0xdevalias/userscripts/issues
7
+ // @downloadURL https://github.com/0xdevalias/userscripts/raw/main/userscripts/http-redirect-enforcer/http-redirect-enforcer.user.js
8
+ // @namespace https://www.devalias.net/
9
+ // @version 0.1
10
+ // @run -at document-start
11
+ // @match https://mail.ensquared.net/*
12
+ // @match https://mail.devalias.net/*
13
+ // @grant none
14
+ // ==/UserScript==
15
+
16
+ ( function ( ) {
17
+ 'use strict' ;
18
+
19
+ const currentLocation = window . location . href ;
20
+
21
+ if ( currentLocation . startsWith ( 'https://' ) ) {
22
+ const httpLocation = currentLocation . replace ( 'https://' , 'http://' ) ;
23
+ window . location . href = httpLocation ;
24
+ }
25
+ } ) ( ) ;
You can’t perform that action at this time.
0 commit comments