Moving pages and scripts into subfolders
parent
04b555f460
commit
8f54b122e7
|
@ -1,5 +1,5 @@
|
|||
if (typeof importScripts !== 'undefined') {
|
||||
importScripts('common-functions-general.js');
|
||||
importScripts('scripts/common-functions.js');
|
||||
}
|
||||
|
||||
// Capture web requests
|
||||
|
@ -40,7 +40,7 @@ chrome.runtime.onInstalled.addListener(async (detail) => {
|
|||
|
||||
// If new install, open settings with starter guide
|
||||
if (detail.reason === 'install') {
|
||||
chrome.tabs.create({ url: 'settings.html?newinstall=true' });
|
||||
chrome.tabs.create({ url: 'pages/settings/index.html?newinstall=true' });
|
||||
}
|
||||
|
||||
// If update, open changelog if setting is enabled
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
"128": "images/logo-128.png"
|
||||
},
|
||||
"action": {
|
||||
"default_popup": "popup.html",
|
||||
"default_popup": "pages/popup/index.html",
|
||||
"default_icon": {
|
||||
"16": "images/logo-16.png",
|
||||
"32": "images/logo-32.png",
|
||||
|
@ -251,8 +251,8 @@
|
|||
"https://www.google.cat/search*"
|
||||
],
|
||||
"js": [
|
||||
"common-functions-general.js",
|
||||
"content-search-filtering.js"
|
||||
"scripts/common-functions.js",
|
||||
"scripts/content-search-filtering.js"
|
||||
],
|
||||
"run_at": "document_start"
|
||||
},
|
||||
|
@ -274,8 +274,8 @@
|
|||
"https://breeze.whateveritworks.org/*"
|
||||
],
|
||||
"js": [
|
||||
"common-functions-general.js",
|
||||
"content-banners.js"
|
||||
"scripts/common-functions.js",
|
||||
"scripts/content-banners.js"
|
||||
],
|
||||
"run_at": "document_start"
|
||||
},
|
||||
|
@ -295,8 +295,8 @@
|
|||
"https://breeze.whateveritworks.org/*"
|
||||
],
|
||||
"js": [
|
||||
"common-functions-general.js",
|
||||
"content-breezewiki.js"
|
||||
"scripts/common-functions.js",
|
||||
"scripts/content-breezewiki.js"
|
||||
],
|
||||
"run_at": "document_end"
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
"128": "images/logo-128.png"
|
||||
},
|
||||
"action": {
|
||||
"default_popup": "popup.html",
|
||||
"default_popup": "pages/popup/index.html",
|
||||
"default_icon": {
|
||||
"16": "images/logo-16.png",
|
||||
"32": "images/logo-32.png",
|
||||
|
@ -49,7 +49,7 @@
|
|||
],
|
||||
"background": {
|
||||
"scripts": [
|
||||
"common-functions-general.js",
|
||||
"scripts/common-functions.js",
|
||||
"background.js"
|
||||
]
|
||||
},
|
||||
|
@ -254,8 +254,8 @@
|
|||
"https://www.google.cat/search*"
|
||||
],
|
||||
"js": [
|
||||
"common-functions-general.js",
|
||||
"content-search-filtering.js"
|
||||
"scripts/common-functions.js",
|
||||
"scripts/content-search-filtering.js"
|
||||
],
|
||||
"run_at": "document_start"
|
||||
},
|
||||
|
@ -277,8 +277,8 @@
|
|||
"https://breeze.whateveritworks.org/*"
|
||||
],
|
||||
"js": [
|
||||
"common-functions-general.js",
|
||||
"content-banners.js"
|
||||
"scripts/common-functions.js",
|
||||
"scripts/content-banners.js"
|
||||
],
|
||||
"run_at": "document_start"
|
||||
},
|
||||
|
@ -298,7 +298,8 @@
|
|||
"https://breeze.whateveritworks.org/*"
|
||||
],
|
||||
"js": [
|
||||
"content-breezewiki.js"
|
||||
"scripts/common-functions.js",
|
||||
"scripts/content-breezewiki.js"
|
||||
],
|
||||
"run_at": "document_end"
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<head>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<meta charset="UTF-8" />
|
||||
<link rel="icon" href="images/logo.png" />
|
||||
<link rel="icon" href="../../images/logo.png" />
|
||||
<title>Indie Wiki Buddy settings</title>
|
||||
<style>
|
||||
/* ELEMENTS */
|
||||
|
@ -91,7 +91,7 @@
|
|||
<h1>Indie Wiki Buddy guide</h1>
|
||||
</div>
|
||||
<div id="links">
|
||||
<a href="settings.html">⇦ Back to Settings</a>
|
||||
<a href="../settings/index.html">⇦ Back to Settings</a>
|
||||
</div>
|
||||
<div id="content">
|
||||
<h2>Overview</h2>
|
||||
|
@ -169,7 +169,7 @@
|
|||
</ul>
|
||||
<h2>Individual wiki settings help</h2>
|
||||
<p>
|
||||
In the individual settings section of the <a href="settings.html" target="_blank">settings</a> page, you can
|
||||
In the individual settings section of the <a href="pages/settings/index.html" target="_blank">settings</a> page, you can
|
||||
configure your settings per-wiki.
|
||||
You can refer to the legend or hover over the icons to learn what each column controls.
|
||||
</p>
|
|
@ -272,7 +272,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<div id="links">
|
||||
<a href="guide.html" target="_blank">Guide</a>
|
||||
<a href="../guide/index.html" target="_blank">Guide</a>
|
||||
|
||||
<a href="https://getindie.wiki" target="_blank">Website</a>
|
||||
|
||||
|
@ -300,17 +300,17 @@
|
|||
<div class="radioGroup horizontal">
|
||||
<label>
|
||||
<input id="defaultWikiActionDisabledRadio" type="radio" name="defaultWikiAction" value="disabled" />
|
||||
<img src="images/toggle-disabled.png" height="12" alt="" />
|
||||
<img src="../../images/toggle-disabled.png" height="12" alt="" />
|
||||
Do nothing
|
||||
</label>
|
||||
<label>
|
||||
<input id="defaultWikiActionAlertRadio" type="radio" name="defaultWikiAction" value="alert" />
|
||||
<img src="images/toggle-alert.png" height="12" alt="" />
|
||||
<img src="../../images/toggle-alert.png" height="12" alt="" />
|
||||
Show banner linking to indie wiki
|
||||
</label>
|
||||
<label>
|
||||
<input id="defaultWikiActionRedirectRadio" type="radio" name="defaultWikiAction" value="redirect" />
|
||||
<img src="images/toggle-redirect.png" height="12" alt="" />
|
||||
<img src="../../images/toggle-redirect.png" height="12" alt="" />
|
||||
Redirect to indie wiki
|
||||
</label>
|
||||
</div>
|
||||
|
@ -320,17 +320,17 @@
|
|||
<div class="radioGroup horizontal">
|
||||
<label>
|
||||
<input id="defaultSearchActionDisabledRadio" type="radio" name="defaultSearchAction" value="disabled" />
|
||||
<img src="images/toggle-disabled.png" height="12" alt="" />
|
||||
<img src="../../images/toggle-disabled.png" height="12" alt="" />
|
||||
Do nothing
|
||||
</label>
|
||||
<label>
|
||||
<input id="defaultSearchActionAlertRadio" type="radio" name="defaultSearchAction" value="replace" />
|
||||
<img src="images/toggle-replace.png" height="12" alt="" />
|
||||
<img src="../../images/toggle-replace.png" height="12" alt="" />
|
||||
Replace non-indie results
|
||||
</label>
|
||||
<label>
|
||||
<input id="defaultSearchActionRedirectRadio" type="radio" name="defaultSearchAction" value="hide" />
|
||||
<img src="images/toggle-hide.png" height="12" alt="" />
|
||||
<img src="../../images/toggle-hide.png" height="12" alt="" />
|
||||
Hide non-indie results
|
||||
</label>
|
||||
</div>
|
||||
|
@ -384,17 +384,17 @@
|
|||
<div class="radioGroup vertical">
|
||||
<label>
|
||||
<input id="breeezwikiSettingDisabledRadio" type="radio" name="breezewikiSetting" value="off" />
|
||||
<img src="images/toggle-disabled.png" height="12" alt="" />
|
||||
<img src="../../images/toggle-disabled.png" height="12" alt="" />
|
||||
BreezeWiki off
|
||||
</label>
|
||||
<label>
|
||||
<input id="breezewikiSettingBannerRadio" type="radio" name="breezewikiSetting" value="banner" />
|
||||
<img src="images/toggle-alert.png" height="12" alt="" />
|
||||
<img src="../../images/toggle-alert.png" height="12" alt="" />
|
||||
Insert banner link to take you to BreezeWiki
|
||||
</label>
|
||||
<label>
|
||||
<input id="breezewikiSettingRedirectRadio" type="radio" name="breezewikiSetting" value="redirect" />
|
||||
<img src="images/toggle-redirect.png" height="12" alt="" />
|
||||
<img src="../../images/toggle-redirect.png" height="12" alt="" />
|
||||
Automatically redirect Fandom to BreezeWiki
|
||||
</label>
|
||||
</div>
|
||||
|
@ -407,15 +407,15 @@
|
|||
<label id="breezewikiCustomHost">
|
||||
Custom BreezeWiki domain:
|
||||
<input disabled type="text" id="customBreezewikiHost" name="customBreezewikiHost" placeholder="See full settings page" size="30" />
|
||||
<span id="breezewikiCustomHostStatus">Change custom domain on <a href="settings.html" target="_blank">full settings page</a></span>
|
||||
<span id="breezewikiCustomHostStatus">Change custom domain on <a href="../settings/index.html" target="_blank">full settings page</a></span>
|
||||
</label>
|
||||
</div>
|
||||
</fieldset>
|
||||
</form>
|
||||
</div>
|
||||
</body>
|
||||
<script type="text/javascript" src="common-functions-general.js"></script>
|
||||
<script type="text/javascript" src="common-functions-settings.js"></script>
|
||||
<script type="text/javascript" src="../../scripts/common-functions.js"></script>
|
||||
<script type="text/javascript" src="../common-page-functions.js"></script>
|
||||
<script type="text/javascript" src="popup.js"></script>
|
||||
|
||||
</html>
|
|
@ -4,7 +4,7 @@ const LANGS = ["DE", "EN", "ES", "FR", "IT", "KO", "PL", "PT", "RU", "TOK", "UK"
|
|||
function setPower(setting) {
|
||||
chrome.storage.local.set({ 'power': setting });
|
||||
var powerImage = document.getElementById('powerImage');
|
||||
powerImage.src = 'images/power-' + setting + '.png';
|
||||
powerImage.src = '../../images/power-' + setting + '.png';
|
||||
powerImage.alt = 'Indie Wiki Buddy is ' + setting;
|
||||
|
||||
chrome.runtime.sendMessage({
|
||||
|
@ -23,7 +23,7 @@ function setPower(setting, storeSetting = true) {
|
|||
chrome.storage.local.set({ 'power': setting });
|
||||
}
|
||||
var powerImage = document.getElementById('powerImage');
|
||||
powerImage.src = 'images/power-' + setting + '.png';
|
||||
powerImage.src = '../../images/power-' + setting + '.png';
|
||||
powerImage.alt = 'Indie Wiki Buddy is ' + setting;
|
||||
if (setting === 'on') {
|
||||
document.getElementById('powerCheckbox').checked = true;
|
||||
|
@ -77,11 +77,11 @@ document.addEventListener('DOMContentLoaded', () => {
|
|||
|
||||
// Listener for settings links:
|
||||
document.getElementById('openSettingsButton').addEventListener('click', () => {
|
||||
chrome.tabs.create({ 'url': chrome.runtime.getURL('settings.html') });
|
||||
chrome.tabs.create({ 'url': chrome.runtime.getURL('pages/settings/index.html') });
|
||||
window.close();
|
||||
});
|
||||
document.getElementById('openSettingsLink').addEventListener('click', () => {
|
||||
chrome.tabs.create({ 'url': chrome.runtime.getURL('settings.html') });
|
||||
chrome.tabs.create({ 'url': chrome.runtime.getURL('pages/settings/index.html') });
|
||||
window.close();
|
||||
});
|
||||
|
|
@ -4,7 +4,7 @@
|
|||
<head>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<meta charset="UTF-8" />
|
||||
<link rel="icon" href="images/logo.png" />
|
||||
<link rel="icon" href="../../images/logo.png" />
|
||||
<title>Indie Wiki Buddy settings</title>
|
||||
<style>
|
||||
/* ELEMENTS */
|
||||
|
@ -346,27 +346,27 @@
|
|||
}
|
||||
|
||||
button#setAllDisabled {
|
||||
background-image: url('images/toggle-disabled.png');
|
||||
background-image: url('../../images/toggle-disabled.png');
|
||||
}
|
||||
|
||||
button#setAllAlert {
|
||||
background-image: url('images/toggle-alert.png');
|
||||
background-image: url('../../images/toggle-alert.png');
|
||||
}
|
||||
|
||||
button#setAllRedirect {
|
||||
background-image: url('images/toggle-redirect.png');
|
||||
background-image: url('../../images/toggle-redirect.png');
|
||||
}
|
||||
|
||||
button#setAllSearchEngineDisabled {
|
||||
background-image: url('images/toggle-disabled.png');
|
||||
background-image: url('../../images/toggle-disabled.png');
|
||||
}
|
||||
|
||||
button#setAllSearchEngineReplace {
|
||||
background-image: url('images/toggle-replace.png');
|
||||
background-image: url('../../images/toggle-replace.png');
|
||||
}
|
||||
|
||||
button#setAllSearchEngineHide {
|
||||
background-image: url('images/toggle-hide.png');
|
||||
background-image: url('../../images/toggle-hide.png');
|
||||
}
|
||||
|
||||
#togglesKeys button:focus {
|
||||
|
@ -383,14 +383,14 @@
|
|||
#togglesDefaults input+label {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-image: url('images/star-off.png');
|
||||
background-image: url('../../images/star-off.png');
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
background-size: 18px;
|
||||
}
|
||||
|
||||
#togglesDefaults input:checked+label {
|
||||
background-image: url('images/star-on.png');
|
||||
background-image: url('../../images/star-on.png');
|
||||
}
|
||||
|
||||
#togglesDefaults label {
|
||||
|
@ -481,7 +481,7 @@
|
|||
<h1>Indie Wiki Buddy</h1>
|
||||
</div>
|
||||
<div id="links">
|
||||
<a href="guide.html">Guide</a>
|
||||
<a href="../guide/index.html">Guide</a>
|
||||
|
||||
<a href="https://getindie.wiki" target="_blank">Website</a>
|
||||
|
||||
|
@ -526,21 +526,21 @@
|
|||
Below that, you can configure what happens when you visit each Fandom and Fextralife wiki that has an
|
||||
independent alternative, as well as what happens to their results in search engines.
|
||||
For visiting wikis, you can choose to be
|
||||
<img src="images/toggle-alert.png" width="12" alt="" /> alerted (default)
|
||||
<img src="../../images/toggle-alert.png" width="12" alt="" /> alerted (default)
|
||||
or
|
||||
<img src="images/toggle-redirect.png" width="12" alt="" />
|
||||
<img src="../../images/toggle-redirect.png" width="12" alt="" />
|
||||
automatically redirected.
|
||||
On search engines, you can choose to
|
||||
<img src="images/toggle-replace.png" width="12" alt="" /> replace (default)
|
||||
<img src="../../images/toggle-replace.png" width="12" alt="" /> replace (default)
|
||||
or
|
||||
<img src="images/toggle-hide.png" width="12" alt="" /> hide
|
||||
<img src="../../images/toggle-hide.png" width="12" alt="" /> hide
|
||||
search results.
|
||||
<br /><br />
|
||||
You can access these settings in the future via the extension's icon
|
||||
<img src="./images/logo-32.png" width="15" alt="icon of an arrow pointing to the right" />
|
||||
<img src="../../images/logo-32.png" width="15" alt="icon of an arrow pointing to the right" />
|
||||
at the top right of your browser. If you don't see the icon,
|
||||
it may be in the extension dropdown, which can be opened via the jigsaw icon
|
||||
<img src="./images/jigsaw.png" width="15" alt="" /> (also at the top right of your browser).
|
||||
<img src="../../images/jigsaw.png" width="15" alt="" /> (also at the top right of your browser).
|
||||
<hr />
|
||||
</div>
|
||||
<form name="options" class="options">
|
||||
|
@ -594,17 +594,17 @@
|
|||
<div class="radioGroup vertical">
|
||||
<label>
|
||||
<input id="breeezwikiSettingDisabledRadio" type="radio" name="breezewikiSetting" value="off" />
|
||||
<img src="images/toggle-disabled.png" height="12" alt="" />
|
||||
<img src="../../images/toggle-disabled.png" height="12" alt="" />
|
||||
BreezeWiki off
|
||||
</label>
|
||||
<label>
|
||||
<input id="breezewikiSettingBannerRadio" type="radio" name="breezewikiSetting" value="banner" />
|
||||
<img src="images/toggle-alert.png" height="12" alt="" />
|
||||
<img src="../../images/toggle-alert.png" height="12" alt="" />
|
||||
Insert banner link to take you to BreezeWiki
|
||||
</label>
|
||||
<label>
|
||||
<input id="breezewikiSettingRedirectRadio" type="radio" name="breezewikiSetting" value="redirect" />
|
||||
<img src="images/toggle-redirect.png" height="12" alt="" />
|
||||
<img src="../../images/toggle-redirect.png" height="12" alt="" />
|
||||
Automatically redirect Fandom to BreezeWiki
|
||||
</label>
|
||||
</div>
|
||||
|
@ -633,14 +633,14 @@
|
|||
can:</span>
|
||||
<div>
|
||||
<div>
|
||||
<img src="images/toggle-disabled.png" width="16" height="16" alt="" /> Do nothing
|
||||
<img src="../../images/toggle-disabled.png" width="16" height="16" alt="" /> Do nothing
|
||||
</div>
|
||||
<div>
|
||||
<img src="images/toggle-alert.png" width="16" height="16" alt="" /> Display banner
|
||||
<img src="../../images/toggle-alert.png" width="16" height="16" alt="" /> Display banner
|
||||
linking to indie wiki
|
||||
</div>
|
||||
<div>
|
||||
<img src="images/toggle-redirect.png" width="16" height="16" alt="" /> Redirect to
|
||||
<img src="../../images/toggle-redirect.png" width="16" height="16" alt="" /> Redirect to
|
||||
indie wiki
|
||||
</div>
|
||||
</div>
|
||||
|
@ -648,14 +648,14 @@
|
|||
alternative, IWB can:</span>
|
||||
<div>
|
||||
<div>
|
||||
<img src="images/toggle-disabled.png" width="16" height="16" alt="" /> Do nothing
|
||||
<img src="../../images/toggle-disabled.png" width="16" height="16" alt="" /> Do nothing
|
||||
</div>
|
||||
<div>
|
||||
<img src="images/toggle-replace.png" width="16" height="16" alt="" /> Replace result with link
|
||||
<img src="../../images/toggle-replace.png" width="16" height="16" alt="" /> Replace result with link
|
||||
to indie wiki
|
||||
</div>
|
||||
<div>
|
||||
<img src="images/toggle-hide.png" width="16" height="16" alt="" /> Hide the result
|
||||
<img src="../../images/toggle-hide.png" width="16" height="16" alt="" /> Hide the result
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
@ -785,8 +785,8 @@
|
|||
</div>
|
||||
</div>
|
||||
</body>
|
||||
<script type="text/javascript" src="common-functions-general.js"></script>
|
||||
<script type="text/javascript" src="common-functions-settings.js"></script>
|
||||
<script type="text/javascript" src="../../scripts/common-functions.js"></script>
|
||||
<script type="text/javascript" src="../common-page-functions.js"></script>
|
||||
<script type="text/javascript" src="settings.js"></script>
|
||||
|
||||
</html>
|
|
@ -281,7 +281,7 @@ async function loadOptions(lang, textFilter = '') {
|
|||
iconLink.title = 'Visit ' + sites[i].destination;
|
||||
iconLink.target = '_blank';
|
||||
let icon = document.createElement("img");
|
||||
icon.src = 'favicons/' + sites[i].language.toLowerCase() + '/' + sites[i].destination_icon;
|
||||
icon.src = '../../favicons/' + sites[i].language.toLowerCase() + '/' + sites[i].destination_icon;
|
||||
icon.alt = 'Visit ' + sites[i].destination;
|
||||
iconLink.appendChild(icon);
|
||||
wikiInfo.appendChild(iconLink);
|
||||
|
@ -567,7 +567,7 @@ document.addEventListener('DOMContentLoaded', () => {
|
|||
chrome.scripting.registerContentScripts([{
|
||||
id: 'content-banners',
|
||||
matches: [breezewikiCustomDomain + '/*'],
|
||||
js: ['content-banners.js'],
|
||||
js: ['scripts/content-banners.js'],
|
||||
runAt: "document_start"
|
||||
}]);
|
||||
chrome.storage.sync.set({ 'breezewikiCustomHost': breezewikiCustomDomain });
|
Loading…
Reference in New Issue