Protocol-relative URL breaks origin checks, use location.protocol.
[webcart1000.git] / webcart1000.js
index 5ede7f9..101a9fd 100644 (file)
@@ -1,12 +1,22 @@
+/* The person who associated a work with this deed has dedicated the
+   work to the public domain by waiving all of his or her rights to
+   the work worldwide under copyright law, including all related and
+   neighboring rights, to the extent allowed by law.
+
+   You can copy, modify, distribute and perform the work, even for
+   commercial purposes, all without asking permission.
+*/
+
 (function () {
     "use strict";
 
 (function () {
     "use strict";
 
-    var ORIGIN = "http://yukkurigames.com";
+    var ORIGIN = location.protocol + "//yukkurigames.com";
     var TARGET = ORIGIN + "/webcart1000/o_o.html";
     var wc1kFrame;
     var wc1kWindow;
     var saveData;
     var _this = this;
     var TARGET = ORIGIN + "/webcart1000/o_o.html";
     var wc1kFrame;
     var wc1kWindow;
     var saveData;
     var _this = this;
+    this.data = scrub();
 
     function clamp (i, hi) { return Math.max(0, Math.min(hi, +i | 0)); }
     function force10 (i) { return clamp(i, 1023); }
 
     function clamp (i, hi) { return Math.max(0, Math.min(hi, +i | 0)); }
     function force10 (i) { return clamp(i, 1023); }