├── .gitignore
├── icon.png
├── weeicon.png
├── .gitattributes
├── manifest.json
├── MIT-LICENSE
├── README.md
├── options.js
├── options.html
├── background.js
├── db.js
└── check.js
/.gitignore:
--------------------------------------------------------------------------------
1 | ## generic files to ignore
2 | *~
3 | *.DS_Store
4 |
--------------------------------------------------------------------------------
/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kyleladd/Check-My-Links/master/icon.png
--------------------------------------------------------------------------------
/weeicon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kyleladd/Check-My-Links/master/weeicon.png
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | # Auto detect text files and perform LF normalization
2 | * text=auto
3 |
4 | # Custom for Visual Studio
5 | *.cs diff=csharp
6 | *.sln merge=union
7 | *.csproj merge=union
8 | *.vbproj merge=union
9 | *.fsproj merge=union
10 | *.dbproj merge=union
11 |
12 | # Standard to msysgit
13 | *.doc diff=astextplain
14 | *.DOC diff=astextplain
15 | *.docx diff=astextplain
16 | *.DOCX diff=astextplain
17 | *.dot diff=astextplain
18 | *.DOT diff=astextplain
19 | *.pdf diff=astextplain
20 | *.PDF diff=astextplain
21 | *.rtf diff=astextplain
22 | *.RTF diff=astextplain
23 |
--------------------------------------------------------------------------------
/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "options_page": "options.html",
3 | "browser_action": {
4 | "default_icon": "weeicon.png",
5 | "default_title": "Check My Links Redux"
6 | },
7 | "description": "Check My Links Redux is a link checker that crawls through your webpage and looks for broken links.",
8 | "icons": { "128": "icon.png" },
9 | "name": "Check My Links Redux",
10 | "permissions": [ "storage","tabs", "http://*/*", "https://*/*" ],
11 | "version": "4.0.0",
12 | "manifest_version": 2,
13 | "background": { "scripts": ["background.js","db.js"],"persistent": true }
14 | }
15 |
--------------------------------------------------------------------------------
/MIT-LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2012 Paul Livingstone
2 |
3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4 |
5 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
6 |
7 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | ## Check My Links
2 |
3 | A Chrome Extension which checks links on webpages and shows their HTTP response codes. This allows web content editors to quickly see which links are broken (for whatever reason) and which resolve correctly. Check My Links is an extension developed primarily for web designers, developers, and content editors that crawls through your webpages looking for broken links and identifying them for you.
4 |
5 | ### Installation
6 | This extension can be found in the Chrome Web Store [https://chrome.google.com/webstore/detail/check-my-links-redux/pmklcclkpjcfmfnmjocmocmgkmkamddk](https://chrome.google.com/webstore/detail/check-my-links-redux/pmklcclkpjcfmfnmjocmocmgkmkamddk)
7 |
8 | ### Instructions
9 |
10 | To use the extension:
11 |
12 | 1. Browse to the page you want to check
13 | 2. Click on the 'Check My Links' button in the Chrome toolbar
14 | 3. The extension will then find all of the links on a web page, and check each one for you. Broken links will be shown on the page highlighted in red with the server response code next to the link (404, 500 etc).
15 |
16 | ### Options
17 | #### Blacklisting
18 | To prevent this extension from checking a link, please enter all or part of the URL in the blacklist below
19 | #### Request Type
20 | HEAD is quicker, but sometimes doesn't reflect the true HTTP status of a page, switch to GET if you're getting weird results.
21 | #### Caching
22 | With caching enabled, valid responses will be stored within the browser's IndexedDB. In future requests to that same link, Check My Links Redux will get the status from the database opposed to making another request.
23 | #### NoFollow
24 | With this enabled, links with rel="nofollow" attribute will be checked.
25 | #### Auto Check
26 | With this enabled, the link checker will automatically start when the user browses to a new page or refreshes.
27 |
28 | ### Issues
29 |
30 | If you want to report an issue, bug or make a suggestion, please do so here:
31 |
32 | [https://github.com/kyleladd/Check-My-Links/issues](https://github.com/kyleladd/Check-My-Links/issues)
33 |
34 | ### The Original Check My Links
35 |
36 | The original Check My Links can be found here:
37 |
38 | [https://github.com/ocodia/Check-My-Links/](https://github.com/ocodia/Check-My-Links/)
39 |
40 | You can install a packaged version of the original extension here:
41 |
42 | [https://chrome.google.com/webstore/detail/check-my-links/ojkcdipcgfaekbeaelaapakgnjflfglf](https://chrome.google.com/webstore/detail/check-my-links/ojkcdipcgfaekbeaelaapakgnjflfglf)
43 |
44 | ### License
45 |
46 | Check My Links is released under the MIT license.
47 |
48 | [www.opensource.org/licenses/MIT](www.opensource.org/licenses/MIT)
49 |
50 | Thanks
51 |
52 |
--------------------------------------------------------------------------------
/options.js:
--------------------------------------------------------------------------------
1 | // Check My Links by Paul Livingstone
2 | // @ocodia
3 |
4 | function loadOptions() {
5 |
6 | var bkg = chrome.extension.getBackgroundPage();
7 | var blacklistItems = bkg.getItem("blacklist");
8 | var checkTypeSelection = bkg.getItem("checkType");
9 | var cache = bkg.getItem("cache");
10 | var autoCheck = bkg.getItem("autoCheck");
11 | var noFollow = bkg.getItem("noFollow");
12 |
13 | if (blacklistItems === null) {
14 | bkg.setItem("blacklist", bkg.blacklistDefaults);
15 | blacklistItems = bkg.getItem("blacklist");
16 | }
17 |
18 | if (checkTypeSelection === null) {
19 | bkg.setItem("checkType", bkg.checkTypeDefault);
20 | checkTypeSelection = bkg.getItem("checkType");
21 | }
22 | if (cache === null) {
23 | bkg.setItem("cache", bkg.cacheDefault);
24 | cache = bkg.getItem("cache");
25 | }
26 |
27 | if(blacklistItems !== null){
28 | blacklistItems.split(" ");
29 | }
30 |
31 | if(cache == 'true'){
32 | document.getElementById("cache").checked = true;
33 | }
34 |
35 | if(bkg.getItem("autoCheck") == null){
36 | bkg.setItem("autoCheck", bkg.autoCheckDefault);
37 | autoCheck = bkg.getItem("autoCheck");
38 | }
39 | if(autoCheck == 'true'){
40 | document.getElementById("autoCheck").checked = true;
41 | }
42 |
43 | if (bkg.getItem("noFollow") == null) {
44 | bkg.setItem("noFollow", bkg.noFollowDefault);
45 | noFollow = bkg.getItem("noFollow");
46 | }
47 |
48 | if(noFollow == 'true'){
49 | document.getElementById("noFollow").checked = true;
50 | }
51 |
52 | document.getElementById("blacklistEntries").value = blacklistItems;
53 | var requestType = document.getElementById("requestType");
54 |
55 | // Select the appropriate saved option for TRENDS
56 | for (var i = 0; i < requestType.children.length; i++) {
57 | var requestTypechild = requestType.children[i];
58 | if (requestTypechild.value == checkTypeSelection) {
59 | requestTypechild.selected = "true";
60 | break;
61 | }
62 | }
63 | }
64 |
65 | function saveOptions() {
66 | var bkg = chrome.extension.getBackgroundPage();
67 | var blacklistEntries = document.getElementById("blacklistEntries");
68 | var requestType = document.getElementById("requestType");
69 | var cache = 'false';
70 | var noFollow = 'false';
71 | if(document.getElementById("cache").checked){
72 | cache = 'true';
73 | }
74 | var autoCheck = 'false';
75 | if(document.getElementById("autoCheck").checked){
76 | autoCheck = 'true';
77 | }
78 | if(document.getElementById("noFollow").checked){
79 | noFollow = 'true';
80 | }
81 | // Save selected options to localstore
82 | bkg.setItem("blacklist", blacklistEntries.value);
83 | bkg.setItem("checkType", requestType.children[requestType.selectedIndex].value);
84 | bkg.setItem("cache", cache);
85 | bkg.setItem("autoCheck", autoCheck);
86 | bkg.setItem("noFollow", noFollow);
87 | document.getElementById("msg").style.visibility = "visible";
88 | }
89 | function deleteObjectStore(){
90 | indexedDBHelper.deleteObjectStore();
91 | console.log("Cleared IndexedDB Datastore");
92 | }
93 |
94 | document.getElementById('save').addEventListener('click', saveOptions);
95 | document.getElementById('clearCache').addEventListener('click', deleteObjectStore);
96 |
97 | loadOptions();
--------------------------------------------------------------------------------
/options.html:
--------------------------------------------------------------------------------
1 |
2 |