diff options
-rw-r--r-- | README.md | 20 | ||||
-rwxr-xr-x | build.py | 1 | ||||
-rw-r--r-- | css/redirector.css | 4 | ||||
-rw-r--r-- | help.html | 4 | ||||
-rw-r--r-- | js/redirect.js | 2 | ||||
-rw-r--r-- | manifest.json | 2 | ||||
-rw-r--r-- | popup.html | 1 | ||||
-rw-r--r-- | redirector.html | 3 |
8 files changed, 19 insertions, 18 deletions
@@ -6,27 +6,21 @@ ## Examples ### De-mobilizer - Example URL: `https://en.m.wikipedia.org/` -- Include pattern: `^(http?s://)(.*\.)m(?:obile)?\.(.*)` +- Include pattern: `^(https?://)([a-z0-9-]*\.)m(?:obile)?\.(.*)` - Redirect to: `$1$2$3` - Pattern type: Regular Expression - Description: always show the desktop site of a webpage ### AMP redirect - Example URL: `https://www.google.com/amp/www.example.com/amp/document` -- Include pattern: `^(?:http?s://)www.(?:google|bing).com/amp/(.*)` +- Include pattern: `^(?:https?://)www.(?:google|bing).com/amp/(.*)` - Redirect to: `https://$1` - Pattern type: Regular Expression - Description: AMP is bad: <https://80x24.net/post/the-problem-with-amp/> -### old reddit -- Example URL: `https://www.reddit.com/u/test` -- Include pattern: `^(?:http?s://)(?:www.)reddit.com(.*)` -- Redirect to: `https://old.reddit.com$1` -- Pattern type: Regular Expression - ### doubleclick escaper - Example URL: `https://ad.doubleclick.net/ddm/trackclk/N135005.2681608PRIVATENETWORK/B20244?https://www.example.com` -- Include pattern: `^(?:http?s://)ad.doubleclick.net/.*\?(http?s://.*)` +- Include pattern: `^(?:https?://)ad.doubleclick.net/.*\?(http?s://.*)` - Redirect to: `$1` - Pattern type: Regular Expression - Description: remove doubleclick link tracking / fix problems with doubleclick host based blocking @@ -36,7 +30,7 @@ What are bangs?: <https://duckduckgo.com/bang> #### use DuckDuckGo.com !bangs on Google - Example URL: `https://www.google.com/search?&ei=-FvkXcOVMo6RRwW5p5DgBg&q=asdfasdf%21+sadfas&oq=%21asdfasdf+sadfas&gs_l=asdfsadfafsgaf` -- Include pattern: `^(?:http?s://)(?:www.)google\.(?:com|au|de|co\.uk)/search\?(?:.*)?(?:oq|q)=([^\&]*\+)?((?:%21|!)[^\&]*)` +- Include pattern: `^(?:https?://)(?:www.)google\.(?:com|au|de|co\.uk)/search\?(?:.*)?(?:oq|q)=([^\&]*\+)?((?:%21|!)[^\&]*)` - Redirect to: `https://duckduckgo.com/?q=$1$2` - Pattern type: Regular Expression - Description: redirect any querry to google with a !bang to DDG @@ -45,21 +39,21 @@ What are bangs?: <https://duckduckgo.com/bang> #### DDG !example Base - Example URL: `https://duckduckgo.com/?q=!`__example__`&get=other` -- Include pattern: `^(?:http?s://)(?:.*\.)?duckduckgo.com/\?q=(?:%21|!)`__example__`(?=[^\+]|$)(?=\W|$)` +- Include pattern: `^(?:https?://)(?:.*\.)?duckduckgo.com/\?q=(?:%21|!)`__example__`(?=[^\+]|$)(?=\W|$)` - Redirect to: `https://example.com/` - Pattern type: Regular Expression - Description: redirect to the base site when bang is the only search parameter #### DDG !example Search - Example URL: `https://duckduckgo.com/?q=searchterm+!`__example__`+searchterm2&get=other` -- Include pattern: `^(?:http?s://)(?:.*\.)?duckduckgo.com/\?q=(.*\+)?(?:(?:%21|!)`__example__`)(?:\+([^\&\?\#]*))?(?:\W|$)` +- Include pattern: `^(?:https?://)(?:.*\.)?duckduckgo.com/\?q=(.*\+)?(?:(?:%21|!)`__example__`)(?:\+([^\&\?\#]*))?(?:\W|$)` - Redirect to: `https://example.com/?query=$1$2` - Pattern type: Regular Expression - Description: redirect to custom site search ##### !ghh git-history - Example URL: `https://duckduckgo.com/?q=!ghh+https%3A%2F%2Fgithub.com%2Fbabel%2Fbabel%2Fblob%2Fmaster%2Fpackages%2Fbabel-core%2FREADME.md&adfasfasd` -- Include pattern: `^(?:http?s://)duckduckgo.com/\?q=(?:(?:%21|!)ghh\+)(?:.*)(github|gitlab|bitbucket)(?:\.org|\.com)(.*?(?=\&))` +- Include pattern: `^(?:https?://)duckduckgo.com/\?q=(?:(?:%21|!)ghh\+)(?:.*)(github|gitlab|bitbucket)(?:\.org|\.com)(.*?(?=\&))` - Redirect to: `https://$1.githistory.xyz$2` - Pattern type: Regular Expression - Description: <https://githistory.xyz> @@ -80,6 +80,7 @@ if __name__ == '__main__': print '' create_addon(files, 'chrome') + create_addon(files, 'edge') create_addon(files, 'opera') create_addon(files, 'firefox') diff --git a/css/redirector.css b/css/redirector.css index 71c7d74..63ee0a7 100644 --- a/css/redirector.css +++ b/css/redirector.css @@ -206,7 +206,7 @@ input[type="radio"] { .redirect-info div p { display:table-cell; - word-wrap:break-word; + word-wrap:anywhere; max-width:700px; } @@ -670,4 +670,4 @@ footer small a:hover { border-color: rgb(68,68,68) !important ; border-radius: 2px; } -}
\ No newline at end of file +} @@ -147,12 +147,12 @@ <h4>Regular expressions</h4> <p>Regular expressions allow for more complicated patterns but they are a lot harder to learn than wildcards. I'm not gonna - create a regex tutorial here but normal javascript regex syntax works, look at <a href="http://regular-expressions.info" target="_blank">http://regular-expressions.info</a> for + create a regex tutorial here but normal javascript regex syntax works, look at <a href="http://www.regular-expressions.info/" target="_blank">Regular-Expressions.info</a> for an introduction to regular expressions. $1,$2 etc. can be used in the redirect url and will be replaced with contents of captures in the regular expressions. Captures are specified with parentheses. Example: <span class="pattern">http://example.com/index.asp\?id=(\d+)</span> will match the url <span class="url">http://example.com/index.asp?id=12345</span> and $1 will be replaced by 12345. (A common mistake in regex patterns is to forget to escape the ? sign in the querystring of the url. ? is a special character in regular expressions so if you want to match an url with a querystring - you should escape it as \?). To test your regular expressions, you may use any website or service. For example, <a href="https://regexr.com" target="_blank">regexr.com</a> </p> + you should escape it as \?). To test your regular expressions, you may use any website or service. For example, <a href="https://regexr.com" target="_blank">RegExr</a>.</p> <a name="storageArea"></a> <h4>Storage Area (Sync vs Local)</h4> diff --git a/js/redirect.js b/js/redirect.js index dcb3ea7..eff4d2c 100644 --- a/js/redirect.js +++ b/js/redirect.js @@ -16,10 +16,12 @@ Redirect.requestTypes = { main_frame: "Main window (address bar)", sub_frame: "IFrames", stylesheet : "Stylesheets", + font: "Fonts", script : "Scripts", image : "Images", imageset: "Responsive Images in Firefox", object : "Objects (e.g. Flash content, Java applets)", + object_subrequest : "Object subrequests", xmlhttprequest : "XMLHttpRequests (Ajax)", history : "HistoryState", other : "Other" diff --git a/manifest.json b/manifest.json index 2e78065..19b88bb 100644 --- a/manifest.json +++ b/manifest.json @@ -2,7 +2,7 @@ "manifest_version": 2, "name": "Redirector", "description": "Automatically redirect content based on user-defined rules.", - "version": "3.5.3", + "version": "3.5.4", "icons": { "16": "images/icon-light-theme-16.png", "19": "images/icon-light-theme-19.png", @@ -4,6 +4,7 @@ <title>REDIRECTOR</title> <link rel="stylesheet" href="css/popup.css" /> <meta charset="UTF-8"> + <meta name="viewport" content="width=device-width"> </head> <body> <h1>REDIRECTOR</h1> diff --git a/redirector.html b/redirector.html index 2d8bcd3..e0f6f4c 100644 --- a/redirector.html +++ b/redirector.html @@ -6,6 +6,7 @@ <link rel="stylesheet" href="css/redirector.css" /> <!-- ☈ --> <link rel="shortcut icon" href="images/icon-light-theme-32.png"> + <meta name="viewport" content="width=device-width"> </head> <body> <div id="cover"> @@ -106,10 +107,12 @@ <label><input type="checkbox" checked="checked" value="main_frame"><span>Main window (address bar)</span></label> <label><input type="checkbox" value="sub_frame"><span>IFrames</span></label> <label><input type="checkbox" value="stylesheet"><span>Stylesheets</span></label> + <label><input type="checkbox" value="font"><span>Fonts</span></label> <label><input type="checkbox" value="script"><span>Scripts</span></label> <label><input type="checkbox" value="image"><span>Images</span></label> <label><input type="checkbox" value="imageset"><span>Responsive Images in Firefox</span></label> <label><input type="checkbox" value="object"><span>Objects (e.g. Flash videos, Java applets)</span></label> + <label><input type="checkbox" value="object_subrequest"><span>Object subrequests</span></label> <label><input type="checkbox" value="xmlhttprequest"><span>XMLHttpRequests (Ajax)</span></label> <label><input type="checkbox" value="history"><span>HistoryState</span></label> <label><input type="checkbox" value="other"><span>Other</span></label> |