summaryrefslogtreecommitdiffstats
path: root/toolkit/components/alerts/resources
diff options
context:
space:
mode:
authorMatt A. Tobin <email@mattatobin.com>2020-02-06 09:47:45 -0500
committerwolfbeast <mcwerewolf@wolfbeast.com>2020-04-14 12:39:21 +0200
commit1000488a5bcdc5078b96c1781a260932c5ae39f1 (patch)
tree7d36c7f45f0df68e67d4f5e8073e36ba1ee545a0 /toolkit/components/alerts/resources
parentffe75592e3d23cefa4e4cbff3605836122002659 (diff)
downloadUXP-1000488a5bcdc5078b96c1781a260932c5ae39f1.tar
UXP-1000488a5bcdc5078b96c1781a260932c5ae39f1.tar.gz
UXP-1000488a5bcdc5078b96c1781a260932c5ae39f1.tar.lz
UXP-1000488a5bcdc5078b96c1781a260932c5ae39f1.tar.xz
UXP-1000488a5bcdc5078b96c1781a260932c5ae39f1.zip
Issue #65 - Remove AppConstants from toolkit/components/alerts
Diffstat (limited to 'toolkit/components/alerts/resources')
-rw-r--r--toolkit/components/alerts/resources/content/alert.js12
1 files changed, 8 insertions, 4 deletions
diff --git a/toolkit/components/alerts/resources/content/alert.js b/toolkit/components/alerts/resources/content/alert.js
index 12068b548..e9725bedb 100644
--- a/toolkit/components/alerts/resources/content/alert.js
+++ b/toolkit/components/alerts/resources/content/alert.js
@@ -4,7 +4,6 @@
var {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components;
-Cu.import("resource://gre/modules/AppConstants.jsm");
Cu.import("resource://gre/modules/Services.jsm");
/*
@@ -26,10 +25,15 @@ const NS_ALERT_HORIZONTAL = 1;
const NS_ALERT_LEFT = 2;
const NS_ALERT_TOP = 4;
-const WINDOW_MARGIN = AppConstants.platform == "win" ? 0 : 10;
-const BODY_TEXT_LIMIT = 200;
-const WINDOW_SHADOW_SPREAD = AppConstants.platform == "win" ? 10 : 0;
+#ifdef XP_WIN
+const WINDOW_MARGIN = 0;
+const WINDOW_SHADOW_SPREAD = 10;
+#else
+const WINDOW_MARGIN = 10;
+const WINDOW_SHADOW_SPREAD = 0;
+#endif
+const BODY_TEXT_LIMIT = 200;
var gOrigin = 0; // Default value: alert from bottom right.
var gReplacedWindow = null;