1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-11-24 19:33:01 +01:00

this addresses #705

This commit is contained in:
gorhill 2015-09-12 10:51:11 -04:00
parent 59bdcbdb7e
commit 4e3fcd576d
3 changed files with 31 additions and 7 deletions

View File

@ -571,6 +571,10 @@
"message": "Because of the following filter",
"description": "English: Because of the following filter"
},
"docblockedNoParamsPrompt": {
"message": "without parameters",
"description": "label to be used for the parameter-less URL: https://cloud.githubusercontent.com/assets/585534/9832014/bfb1b8f0-593b-11e5-8a27-fba472a5529a.png"
},
"docblockedFoundIn": {
"message": "Found in:",
"description": "English: List of filter list names follows"

View File

@ -67,9 +67,14 @@ select {
opacity: 0.5;
padding: 0.2em;
position: absolute;
right: 0;
transform: translate(0, -50%);
}
body[dir="ltr"] #theURL > p > span {
right: 0;
}
body[dir="rtl"] #theURL > p > span {
left: 0;
}
#theURL > p:hover > span {
opacity: 1;
}
@ -86,7 +91,7 @@ select {
color: gray;
font-size: small;
overflow-x: hidden;
padding: 0 4px 4px 4px;
padding: 4px;
text-align: initial;
text-overflow: ellipsis;
}
@ -102,9 +107,6 @@ select {
#parsed span {
display: inline-block;
}
#parsed a {
font-weight: bold;
}
#parsed span:first-of-type {
font-weight: bold;
}

View File

@ -195,8 +195,16 @@ uDom.nodeFromId('why').textContent = details.fs;
if ( url === null || url.search.length === 0 ) {
return false;
}
var pos = rawURL.indexOf('?');
var li = liFromParam(
vAPI.i18n('docblockedNoParamsPrompt'),
rawURL.slice(0, pos)
);
parentNode.appendChild(li);
var params = url.search.slice(1).split('&');
var param, pos, name, value, li, ul;
var param, name, value, ul;
for ( var i = 0; i < params.length; i++ ) {
param = params[i];
pos = param.indexOf('=');
@ -225,8 +233,18 @@ uDom.nodeFromId('why').textContent = details.fs;
uDom('#theURL > p').append(toggler);
uDom(toggler).on('click', function() {
uDom.nodeFromId('theURL').classList.toggle('collapsed');
var cl = uDom.nodeFromId('theURL').classList;
cl.toggle('collapsed');
vAPI.localStorage.setItem(
'document-blocked-expand-url',
(cl.contains('collapsed') === false).toString()
);
});
uDom.nodeFromId('theURL').classList.toggle(
'collapsed',
vAPI.localStorage.getItem('document-blocked-expand-url') !== 'true'
);
})();
/******************************************************************************/