Added link to Wiki page of rule generator

This commit is contained in:
nobody 2020-07-14 20:43:56 +02:00
parent 4c6e1f2ab8
commit f0fd40cbc0
No known key found for this signature in database
GPG Key ID: 8F6DE3D614FCFD7A
4 changed files with 23 additions and 2 deletions

View File

@ -130,6 +130,18 @@ body {
margin-right: 3px;
}
#ruleset-help-icon {
display: inline-block;
cursor: pointer;
background-image: url("../../icons/info-dark.svg");
background-size: contain;
background-position: left;
background-repeat: no-repeat;
margin-left: 5px;
width: 15px;
height: 15px;
}
/**
* Buttons
*/

View File

@ -142,9 +142,9 @@
</div>
<div class="option-group">
<section class="option">
<div class="title-option without-checkbox" data-i18n-content="generateRuleSetTitle"></div>
<div class="title-option without-checkbox"><span data-i18n-content="generateRuleSetTitle">Generate rule set</span><span id="ruleset-help-icon"></span></div>
<div class="description-option without-checkbox">
<p class="without-checkbox" data-i18n-content="generateRuleSetDescription"></p>
<p class="without-checkbox" data-i18n-content="generateRuleSetDescription">In case you're using uBlock Origin or uMatrix you can generate the rules here. You have to add these rules manually in uBlock Origin or uMatrix.</p>
</div>
<div class="ruleset-generator">
<p id="last-mapping-update" class="description-option last-update without-checkbox" data-i18n-content="lastUpdate">Last update:</p>

View File

@ -100,6 +100,7 @@ options._renderOptionsPanel = function () {
document.getElementById('link-changelog').addEventListener('click', options._onClickChangelog);
document.getElementById('link-donate').addEventListener('click', options._onClickDonate);
document.getElementById('link-faq').addEventListener('click', options._onClickFaq);
document.getElementById('ruleset-help-icon').addEventListener('click', options._onClickRulesetHelp);
};
options._renderBlockMissingNotice = function () {
@ -371,6 +372,13 @@ options._onClickFaq = function() {
});
};
options._onClickRulesetHelp = function() {
chrome.tabs.create({
'url': 'https://codeberg.org/nobody/LocalCDN/wiki/Ruleset-generator-for-uBlock-Origin-or-uMatrix',
'active': true
});
};
/**
* Updates the domain lists if the options page has no focus.
* document.hasFocus() prevents problems with keyboard input.

View File

@ -29,6 +29,7 @@
<li>Fixed: Bootstrap (JS & CSS) added to JSDelivr (<a href="https://codeberg.org/nobody/LocalCDN/issues/60">#60</a>)</li>
<li>Improved: Blue/Grey icon theme (<a href="https://codeberg.org/nobody/LocalCDN/issues/52">#52</a>)</li>
<li>Updated: i18n</li>
<li>Implemented: Link to Wiki page for rule generator</li>
</ul>
<div class="topic-label">
Generate rule sets for uBlock or uMatrix