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 charset="utf-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1 user-scalable=yes">
|
<meta name="viewport" content="width=device-width, initial-scale=1 user-scalable=yes">
|
||||||
<title></title>
|
<title></title>
|
||||||
<link rel="stylesheet" type="text/css" href="css/themes/default.css">
|
<link rel="stylesheet" href="css/themes/default.css">
|
||||||
<link rel="stylesheet" href="css/common.css" type="text/css">
|
<link rel="stylesheet" href="css/common.css">
|
||||||
<link rel="stylesheet" href="css/fa-icons.css" type="text/css">
|
<link rel="stylesheet" href="css/fa-icons.css">
|
||||||
<link rel="stylesheet" type="text/css" href="css/document-blocked.css">
|
<link rel="stylesheet" href="css/document-blocked.css">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<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>
|
<div>
|
||||||
<p data-i18n="docblockedPrompt1"></p>
|
<p data-i18n="docblockedPrompt1"></p>
|
||||||
|
@ -51,7 +51,7 @@
|
||||||
<span class="filterList">
|
<span class="filterList">
|
||||||
<span class="filterListSeparator">•</span>
|
<span class="filterListSeparator">•</span>
|
||||||
<a class="filterListSource" href="asset-viewer.html?url=" target="_blank"></a> <!--
|
<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>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -60,19 +60,17 @@ let details = {};
|
||||||
|
|
||||||
const parent = uDom.nodeFromSelector('#whyex > span:nth-of-type(2)');
|
const parent = uDom.nodeFromSelector('#whyex > span:nth-of-type(2)');
|
||||||
for ( const list of lists ) {
|
for ( const list of lists ) {
|
||||||
const elem = document.querySelector('#templates .filterList')
|
const listElem = document.querySelector('#templates .filterList')
|
||||||
.cloneNode(true);
|
.cloneNode(true);
|
||||||
const source = elem.querySelector('.filterListSource');
|
const sourceElem = listElem.querySelector('.filterListSource');
|
||||||
source.href += encodeURIComponent(list.assetKey);
|
sourceElem.href += encodeURIComponent(list.assetKey);
|
||||||
source.textContent = list.title;
|
sourceElem.textContent = list.title;
|
||||||
if (
|
if ( typeof list.supportURL === 'string' && list.supportURL !== '' ) {
|
||||||
typeof list.supportURL === 'string' &&
|
const supportElem = listElem.querySelector('.filterListSupport');
|
||||||
list.supportURL !== ''
|
supportElem.setAttribute('href', list.supportURL);
|
||||||
) {
|
supportElem.classList.remove('hidden');
|
||||||
elem.querySelector('.filterListSupport')
|
|
||||||
.setAttribute('href', list.supportURL);
|
|
||||||
}
|
}
|
||||||
parent.appendChild(elem);
|
parent.appendChild(listElem);
|
||||||
}
|
}
|
||||||
uDom.nodeFromId('whyex').style.removeProperty('display');
|
uDom.nodeFromId('whyex').style.removeProperty('display');
|
||||||
})();
|
})();
|
||||||
|
|
Loading…
Reference in New Issue