[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [torbutton/master] Bug 26100: Update deprecated JS and CSS code
commit 3047f3fcb9c606a659c6e7ffa7e4d97e33cd0ebe
Author: Igor Oliveira <igt0@xxxxxxxxxxxxxx>
Date: Wed Feb 28 17:38:59 2018 -0300
Bug 26100: Update deprecated JS and CSS code
- catch statement can not have if statements.
https://bugzilla.mozilla.org/show_bug.cgi?id=1228841
- Use 0o to represent octal numbers.
https://bugzilla.mozilla.org/show_bug.cgi?id=1263074
- remove -moz- prefix in css
https://bugzilla.mozilla.org/show_bug.cgi?id=1270406
---
src/chrome/content/torbutton.js | 9 ++++++---
src/chrome/skin/aboutTor.css | 6 +++---
src/chrome/skin/tor-circuit-display.css | 4 ++--
src/components/cookie-jar-selector.js | 4 ++--
4 files changed, 13 insertions(+), 10 deletions(-)
diff --git a/src/chrome/content/torbutton.js b/src/chrome/content/torbutton.js
index d744d15..4b15c5f 100644
--- a/src/chrome/content/torbutton.js
+++ b/src/chrome/content/torbutton.js
@@ -1140,9 +1140,12 @@ function torbutton_do_new_identity() {
// #5715 also makes this synchronous. So we pass a null callback.
try {
appCacheStorage.asyncEvictStorage(null);
- } catch (err if err.name == 'NS_ERROR_NOT_AVAILABLE') {
- // We ignore "not available" errors because they occur if a cache
- // has not been used, e.g., if no browsing has been done.
+ } catch (err) {
+ // We ignore "not available" errors because they occur if a cache
+ // has not been used, e.g., if no browsing has been done.
+ if (err.name !== 'NS_ERROR_NOT_AVAILABLE') {
+ throw err;
+ }
}
}
} catch(e) {
diff --git a/src/chrome/skin/aboutTor.css b/src/chrome/skin/aboutTor.css
index 7ba7e7c..873f6d0 100644
--- a/src/chrome/skin/aboutTor.css
+++ b/src/chrome/skin/aboutTor.css
@@ -25,11 +25,11 @@ body {
}
body {
- background-image: -moz-linear-gradient(top, #ffffff, #ffffff 10%, #dddddd 50%, #dddddd);
+ background-image: linear-gradient(to bottom, #ffffff, #ffffff 10%, #dddddd 50%, #dddddd);
}
body[toron] {
- background-image: -moz-linear-gradient(top, #ffffff, #ffffff 10%, #d5ffd5 50%, #d5ffd5);
+ background-image: linear-gradient(to bottom, #ffffff, #ffffff 10%, #d5ffd5 50%, #d5ffd5);
}
/* Hide the entire document by default to avoid showing the incorrect
@@ -221,7 +221,7 @@ body .top div.hideIfTorIsUpToDate h1 {
padding: 5px 0 0 22px;
}
-#middle ul:-moz-dir(rtl) {
+#middle ul:dir(rtl) {
padding: 5px 22px 0 0;
}
diff --git a/src/chrome/skin/tor-circuit-display.css b/src/chrome/skin/tor-circuit-display.css
index 640d595..c9e682a 100644
--- a/src/chrome/skin/tor-circuit-display.css
+++ b/src/chrome/skin/tor-circuit-display.css
@@ -21,7 +21,7 @@ and lines drawn between them to represent Tor network inter-relay connections.
width: 100%;
}
-#circuit-display-content:-moz-locale-dir(rtl) {
+#circuit-display-content:dir(rtl) {
background-position: calc(100% - 1em) 1em;
}
@@ -65,7 +65,7 @@ ul#circuit-display-nodes li {
white-space: nowrap;
}
-ul#circuit-display-nodes li:-moz-locale-dir(rtl) {
+ul#circuit-display-nodes li:dir(rtl) {
background-position: right center;
}
diff --git a/src/components/cookie-jar-selector.js b/src/components/cookie-jar-selector.js
index f6d579e..4f137d7 100644
--- a/src/components/cookie-jar-selector.js
+++ b/src/components/cookie-jar-selector.js
@@ -143,7 +143,7 @@ function CookieJarSelector() {
var file = getProfileFile("cookies-" + name + ".json");
var foStream = Cc["@mozilla.org/network/file-output-stream;1"]
.createInstance(Ci.nsIFileOutputStream);
- foStream.init(file, 0x02 | 0x08 | 0x20, 0666, 0);
+ foStream.init(file, 0x02 | 0x08 | 0x20, 0o666, 0);
var data = JSON.stringify(this["cookiesobj-" + name]);
foStream.write(data, data.length);
foStream.close();
@@ -154,7 +154,7 @@ function CookieJarSelector() {
var file = getProfileFile("protected-" + name + ".json");
var foStream = Cc["@mozilla.org/network/file-output-stream;1"]
.createInstance(Ci.nsIFileOutputStream);
- foStream.init(file, 0x02 | 0x08 | 0x20, 0666, 0);
+ foStream.init(file, 0x02 | 0x08 | 0x20, 0o666, 0);
var data = JSON.stringify(this["protected-" + name]);
foStream.write(data, data.length);
foStream.close();
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits