mirror of https://github.com/gorhill/uBlock.git
Fix invalid support URL in document-blocked page
Related issue: - https://github.com/uBlockOrigin/uBlock-issues/issues/1345
This commit is contained in:
parent
8362751be5
commit
e360e90d1e
|
@ -4,13 +4,13 @@
|
|||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1 user-scalable=yes">
|
||||
<title></title>
|
||||
<link rel="stylesheet" type="text/css" href="css/themes/default.css">
|
||||
<link rel="stylesheet" href="css/common.css" type="text/css">
|
||||
<link rel="stylesheet" href="css/fa-icons.css" type="text/css">
|
||||
<link rel="stylesheet" type="text/css" href="css/document-blocked.css">
|
||||
<link rel="stylesheet" href="css/themes/default.css">
|
||||
<link rel="stylesheet" href="css/common.css">
|
||||
<link rel="stylesheet" href="css/fa-icons.css">
|
||||
<link rel="stylesheet" href="css/document-blocked.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="warningSign"><a class="fa-icon" href="https://github.com/gorhill/uBlock/wiki/Strict-blocking" target="_blank">exclamation-triangle</a></div>
|
||||
<div id="warningSign"><a class="fa-icon" href="https://github.com/gorhill/uBlock/wiki/Strict-blocking" target="_blank" rel="noopener noreferrer">exclamation-triangle</a></div>
|
||||
|
||||
<div>
|
||||
<p data-i18n="docblockedPrompt1"></p>
|
||||
|
@ -51,7 +51,7 @@
|
|||
<span class="filterList">
|
||||
<span class="filterListSeparator">•</span>
|
||||
<a class="filterListSource" href="asset-viewer.html?url=" target="_blank"></a> <!--
|
||||
--><a class="fa filterListSupport" href="#" target="_blank"></a>
|
||||
--><a class="fa-icon filterListSupport hidden" href="#" target="_blank" rel="noopener noreferrer">home</a>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -60,19 +60,17 @@ let details = {};
|
|||
|
||||
const parent = uDom.nodeFromSelector('#whyex > span:nth-of-type(2)');
|
||||
for ( const list of lists ) {
|
||||
const elem = document.querySelector('#templates .filterList')
|
||||
.cloneNode(true);
|
||||
const source = elem.querySelector('.filterListSource');
|
||||
source.href += encodeURIComponent(list.assetKey);
|
||||
source.textContent = list.title;
|
||||
if (
|
||||
typeof list.supportURL === 'string' &&
|
||||
list.supportURL !== ''
|
||||
) {
|
||||
elem.querySelector('.filterListSupport')
|
||||
.setAttribute('href', list.supportURL);
|
||||
const listElem = document.querySelector('#templates .filterList')
|
||||
.cloneNode(true);
|
||||
const sourceElem = listElem.querySelector('.filterListSource');
|
||||
sourceElem.href += encodeURIComponent(list.assetKey);
|
||||
sourceElem.textContent = list.title;
|
||||
if ( typeof list.supportURL === 'string' && list.supportURL !== '' ) {
|
||||
const supportElem = listElem.querySelector('.filterListSupport');
|
||||
supportElem.setAttribute('href', list.supportURL);
|
||||
supportElem.classList.remove('hidden');
|
||||
}
|
||||
parent.appendChild(elem);
|
||||
parent.appendChild(listElem);
|
||||
}
|
||||
uDom.nodeFromId('whyex').style.removeProperty('display');
|
||||
})();
|
||||
|
|
Loading…
Reference in New Issue