Permalink
Browse files

Merge branch 'master' of https://github.com/Gemorroj/noads-advanced

  • Loading branch information...
2 parents 1b98361 + ea9a1dd commit 798675c897ddab238da1aaff9cfe788339bbcb94 @Gemorroj committed Jun 15, 2012
Showing with 9 additions and 8 deletions.
  1. +0 −1 includes/noads-common.js
  2. +9 −7 includes/noads-options.js
View
@@ -11,7 +11,6 @@
// ==/UserScript==
var storage = widget.preferences;
-var extension = window.opera.extension;
var domain = window.location.hostname;
// Helper Functions
View
@@ -13,7 +13,7 @@
// styles for option pages
var optionsCSS = '.noads_overlay{visibility:visible;background-color:#e3e5e7;direction:ltr;display:block !important;font-family:"Lucida Grande", Tahoma, Arial, Verdana, sans-serif;font-size:12px !important;height:100%;left:0;overflow:auto;position:fixed;top:0;width:100%;z-index:1000000 !important;margin:0;padding:0;}\
-.noads_win{letter-spacing:normal !important;box-sizing:content-box !important;text-transform:none !important;text-shadow:none !important;font-weight: normal !important;display:block !important;background-color:#f3f4f5;border-radius:0;color:#000;height:96.7%;overflow:visible;width:auto;margin:0 auto;padding:1%;}\
+.noads_win{letter-spacing:normal !important;box-sizing:content-box !important;text-transform:none !important;text-shadow:none !important;font-weight: normal !important;display:block !important;background-color:#f3f4f5;border-radius:0;color:#000;height:96.6%;overflow:visible;width:auto;margin:0 auto;padding:1%;}\
.noads_close_window{letter-spacing:normal !important;text-transform:none !important;text-shadow:none !important;box-shadow:none !important;background:-o-skin("Caption Close Button Skin");border:none;cursor:pointer;display:block !important;float:right;height:18px;width:18px;margin:0;padding:0;}\
.noads_menu{letter-spacing:normal !important;text-transform:none !important;text-shadow:none !important;box-shadow:none !important;list-style:none;overflow:hidden;margin:0 0 -1px 2px;padding:2px 2px 0;}\
.noads_menu li{border:1px solid #aaa;border-bottom-color:#fafbfc;border-radius:4px 4px 0 0;color:#000;cursor:default;float:left;font-family:Tahoma,sans-serif;font-size:14px;line-height:normal;list-style-position:outside;text-align:left;white-space:nowrap;margin:0 0 0 1px;padding:3px 9px;}\
@@ -45,6 +45,7 @@ var optionsCSS = '.noads_overlay{visibility:visible;background-color:#e3e5e7;dir
.noads_content input[type="range"] {height: 100%;width: 50px;float:right;margin-top:20px;}\
#noads_autoupdate_label {float:right;text-align: right;padding-bottom: 6px; height: 83%; width: 24%;}\
.noads_subscriptions_block{height: 91%; overflow: auto; width: 75%;}\
+.noads_input_help{font: bold 13px sans-serif;}\
.noads_help{background-color:#fafbfc;border:none;box-sizing:border-box;color:#000;font-family:monospace;font-size:14px;height:auto;overflow:auto;white-space:pre-wrap;width:96%;margin:4px 0;padding:0 4px;}';
// images for buttons
@@ -788,7 +789,7 @@ var options = {
this.appendChild(this.createButton('noads_button_export', lng.pExport, '', imgSave, function () {
var val = document.getElementById('noads_usercss_textarea').value.replace(/^\s+|\r|\s+$/g, '');
- window.open('data:text/plain;charset=UTF-8;base64,' + window.btoa(val), 'Export');
+ window.open('data:text/plain;charset=UTF-8,' + window.encodeURIComponent(val), 'Export');
}));
};
area.showCSSList = function (pos) {
@@ -803,7 +804,7 @@ var options = {
this.appendChild(this.createButton('noads_button_export', lng.pExport, '', imgSave, function () {
var val = document.getElementById('noads_css_textarea').value.replace(/^\s+|\r|\s+$/g, '');
- window.open('data:text/plain;charset=UTF-8;base64,' + window.btoa(val), 'Export');
+ window.open('data:text/plain;charset=UTF-8,' + window.encodeURIComponent(val), 'Export');
}));
};
area.showScriptWhitelist = function (pos) {
@@ -819,7 +820,7 @@ var options = {
this.appendChild(this.createButton('noads_button_export', lng.pExport, '', imgSave, function () {
var val = document.getElementById('noads_scriptlist_textarea').value.replace(/^\s+|\r|\s+$/g, '');
- window.open('data:text/plain;charset=UTF-8;base64,' + window.btoa(val), 'Export');
+ window.open('data:text/plain;charset=UTF-8,' + window.encodeURIComponent(val), 'Export');
}));
};
area.showMagicList = function (pos) {
@@ -834,7 +835,7 @@ var options = {
this.appendChild(this.createButton('noads_button_export', lng.pExport, '', imgSave, function () {
var val = document.getElementById('noads_magic_textarea').value.replace(/^\s+|\r|\s+$/g, '');
- window.open('data:text/plain;charset=UTF-8;base64,' + window.btoa(val), 'Export');
+ window.open('data:text/plain;charset=UTF-8,' + window.encodeURIComponent(val), 'Export');
}));
};
area.showUserURLfilters = function (pos) {
@@ -853,7 +854,7 @@ var options = {
this.appendChild(this.createButton('noads_button_export', lng.pExport, '', imgSave, function () {
var val = document.getElementById('noads_userurlfilterlist_textarea').value.replace(/^\s+|\r|\s+$/g, '');
- window.open('data:text/plain;charset=UTF-8;base64,' + window.btoa(val), 'Export');
+ window.open('data:text/plain;charset=UTF-8,' + window.encodeURIComponent(val), 'Export');
}));
};
area.showURLfilters = function (pos) {
@@ -872,7 +873,7 @@ var options = {
this.appendChild(this.createButton('noads_button_export', lng.pExport, '', imgSave, function () {
var val = document.getElementById('noads_urlfilterlist_textarea').value.replace(/^\s+|\r|\s+$/g, '');
- window.open('data:text/plain;charset=UTF-8;base64,' + window.btoa(val), 'Export');
+ window.open('data:text/plain;charset=UTF-8,' + window.encodeURIComponent(val), 'Export');
}));
};
@@ -913,6 +914,7 @@ var options = {
button.type = 'button';
var disabled = !options.checkEnabled('noads_scriptlist_state') || !options.isActiveDomain('noads_scriptlist_white', domain);
var p = document.createElement('p');
+ p.className = 'noads_input_help';
p.appendChild(document.createTextNode(lng.pBlockedScripts));
this.appendChild(p);
var textarea = document.createElement('textarea');

0 comments on commit 798675c

Please sign in to comment.