mirror of
https://codeberg.org/nobody/LocalCDN.git
synced 2025-06-05 21:49:31 +02:00
Link to the help page added
This commit is contained in:
@@ -279,6 +279,24 @@ input:checked + .slider:before {
|
|||||||
cursor: not-allowed;
|
cursor: not-allowed;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#manipulateDOM-indicator {
|
||||||
|
display: inline-block;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
#manipulateDOM-indicator:hover {
|
||||||
|
color: #777;
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
|
||||||
|
#info-button-svg {
|
||||||
|
background-image: url("../../icons/info-dark.svg");
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
cursor: pointer;
|
||||||
|
width: 15px;
|
||||||
|
margin-left: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Links
|
* Links
|
||||||
*/
|
*/
|
||||||
@@ -445,6 +463,10 @@ input:checked + .slider:before {
|
|||||||
background-color: #323232;
|
background-color: #323232;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#info-button-svg {
|
||||||
|
background-image: url("../../icons/info-light.svg");
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Links
|
* Links
|
||||||
*/
|
*/
|
||||||
|
@@ -59,8 +59,8 @@
|
|||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="label-domain">
|
<div id="label-manipulateDOM" class="label-domain">
|
||||||
<span id="manipulateDOM-indicator" data-i18n-content="labelManipulateDOM"></span>
|
<span id="manipulateDOM-indicator" data-i18n-content="labelManipulateDOM"></span><div id="info-button-svg"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
@@ -40,13 +40,15 @@ popup._renderContents = function () {
|
|||||||
|
|
||||||
popup._renderNonContextualContents = function () {
|
popup._renderNonContextualContents = function () {
|
||||||
|
|
||||||
let versionLabelElement, counterElement, testingUtilityLinkElement, optionsButtonElement, donationButtonElement;
|
let versionLabelElement, counterElement, testingUtilityLinkElement, optionsButtonElement, donationButtonElement, infoButtonLabel, infoButtonSVG;
|
||||||
|
|
||||||
versionLabelElement = document.getElementById('version-label');
|
versionLabelElement = document.getElementById('version-label');
|
||||||
counterElement = document.getElementById('injection-counter');
|
counterElement = document.getElementById('injection-counter');
|
||||||
testingUtilityLinkElement = document.getElementById('testing-utility-link');
|
testingUtilityLinkElement = document.getElementById('testing-utility-link');
|
||||||
optionsButtonElement = document.getElementById('options-button');
|
optionsButtonElement = document.getElementById('options-button');
|
||||||
donationButtonElement = document.getElementById('donate-button');
|
donationButtonElement = document.getElementById('donate-button');
|
||||||
|
infoButtonLabel = document.getElementById('manipulateDOM-indicator');
|
||||||
|
infoButtonSVG = document.getElementById('info-button-svg');
|
||||||
|
|
||||||
versionLabelElement.innerText = popup._version;
|
versionLabelElement.innerText = popup._version;
|
||||||
counterElement.innerText = helpers.formatNumber(popup._amountInjected);
|
counterElement.innerText = helpers.formatNumber(popup._amountInjected);
|
||||||
@@ -54,6 +56,8 @@ popup._renderNonContextualContents = function () {
|
|||||||
testingUtilityLinkElement.addEventListener('mouseup', popup._onTestingUtilityLinkClicked);
|
testingUtilityLinkElement.addEventListener('mouseup', popup._onTestingUtilityLinkClicked);
|
||||||
optionsButtonElement.addEventListener('mouseup', popup._onOptionsButtonClicked);
|
optionsButtonElement.addEventListener('mouseup', popup._onOptionsButtonClicked);
|
||||||
donationButtonElement.addEventListener('mouseup', popup._onDonationButtonClicked);
|
donationButtonElement.addEventListener('mouseup', popup._onDonationButtonClicked);
|
||||||
|
infoButtonLabel.addEventListener('mouseup', popup._onInfoButtonClicked);
|
||||||
|
infoButtonSVG.addEventListener('mouseup', popup._onInfoButtonClicked);
|
||||||
};
|
};
|
||||||
|
|
||||||
popup._renderContextualContents = function () {
|
popup._renderContextualContents = function () {
|
||||||
@@ -505,6 +509,20 @@ popup._onMoreInjectionsButton = function () {
|
|||||||
popup._close();
|
popup._close();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
popup._onInfoButtonClicked = function () {
|
||||||
|
if (event.button === 0 || event.button === 1) {
|
||||||
|
|
||||||
|
chrome.tabs.create({
|
||||||
|
'url': chrome.extension.getURL('pages/help/help.html'),
|
||||||
|
'active': (event.button === 0)
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
if (event.button === 0) {
|
||||||
|
window.close();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initializations
|
* Initializations
|
||||||
|
Reference in New Issue
Block a user