aboutsummaryrefslogtreecommitdiffstats
path: root/src/js
diff options
context:
space:
mode:
authorgorhill <rhill@raymondhill.net>2015-09-12 10:51:11 -0400
committergorhill <rhill@raymondhill.net>2015-09-12 10:51:11 -0400
commit4e3fcd576d5fd5c9f3cb57ee2f65f2044681298b (patch)
treec0ae2c9bbc912d89b9f2100e17b5e0be9af435d9 /src/js
parent59bdcbdb7e8ac788ed07c909606b7f9b31be1500 (diff)
downloaduBlock-4e3fcd576d5fd5c9f3cb57ee2f65f2044681298b.zip
uBlock-4e3fcd576d5fd5c9f3cb57ee2f65f2044681298b.tar.gz
uBlock-4e3fcd576d5fd5c9f3cb57ee2f65f2044681298b.tar.bz2
this addresses #705
Diffstat (limited to 'src/js')
-rw-r--r--src/js/document-blocked.js22
1 files changed, 20 insertions, 2 deletions
diff --git a/src/js/document-blocked.js b/src/js/document-blocked.js
index a37e3d6..f4d7b4e 100644
--- a/src/js/document-blocked.js
+++ b/src/js/document-blocked.js
@@ -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'
+ );
})();
/******************************************************************************/