Commit 0d108acd authored by Cédric Le Ninivin's avatar Cédric Le Ninivin

Remove hardcoded link to the original domain

parent 0e0e1c9b
......@@ -34,7 +34,8 @@
.declareMethod('render', function (options) {
var gadget = this,
jio_configuration_string = "https://cribjs.nexedi.net/cribjs-latest.zip";
getURL = window.location,
jio_configuration_string = getURL.protocol + "//" + getURL.host + "/cribjs-latest.zip";
return RSVP.Queue()
.push(function () {
return gadget.getDeclaredGadget('jio_configurator');
......
......@@ -4,10 +4,10 @@
"use strict";
function getStorageGadget(gadget) {
var storage_gadget, site_editor_gadget_url;
var storage_gadget, site_editor_gadget_url, getURL = window.location;
return gadget.getSetting(
"site_editor_gadget_url",
"https://cribjs.nexedi.net/gadget/crib-sw-storage-gadget.html"
getURL.protocol + "//" + getURL.host + "/gadget/crib-sw-storage-gadget.html"
)
.push(function (url) {
if (gadget.props.storage_gadget_url == url) {
......@@ -43,8 +43,9 @@
g.props = {};
return g.getElement()
.push(function (element) {
var getURL = window.location;
g.props.element = element;
g.props.storage_gadget_url = "https://cribjs.nexedi.net/gadget/crib-sw-storage-gadget.html";
getURL.protocol + "//" + getURL.host + "/gadget/crib-sw-storage-gadget.html"
});
})
.ready(function(gadget) {
......
......@@ -15,5 +15,6 @@
</head>
<body>
Couscosu
</body>
</html>
\ No newline at end of file
......@@ -92,7 +92,7 @@
// XXX Hack to not add a new service worker when one is already declared
if (!navigator.serviceWorker.controller) {
return new RSVP.Promise(function(resolve, reject, notify) {
navigator.serviceWorker.register('sw.js', {scope: './'}).then(
navigator.serviceWorker.register('/sw.js', {scope: '/'}).then(
function(){
if (navigator.serviceWorker.controller) {
resolve();
......
......@@ -20,7 +20,7 @@
<div class="nav_content save_load container">
<h3>Site Editor Gadget URL</h3>
<p>Enter the URL of the Crib Gadget from the site you want to edit. If you want to edit this site use:
"https://cribjs.nexedi.net/gadget/crib-sw-storage-gadget.html"</p>
"/gadget/crib-sw-storage-gadget.html"</p>
<div class="row">
<table class="table">
<tr>
......@@ -33,7 +33,7 @@
<div class="form-group">
<label for="url" class="col-sm-2 control-label">URL</label>
<div class="col-sm-10">
<input type="text" class="form-control url" id="url" value="https://cribjs.nexedi.net/gadget/crib-sw-storage-gadget.html">
<input type="text" class="form-control url" id="url" value="/gadget/crib-sw-storage-gadget.html">
</div>
</div>
<div class="form-group">
......
......@@ -30,9 +30,10 @@
gadget.props.options = options;
return new RSVP.Queue()
.push(function () {
var getURL = window.location;
return gadget.getSetting(
"site_editor_gadget_url",
"https://cribjs.nexedi.net/gadget/crib-sw-storage-gadget.html"
getURL.protocol + "//" + getURL.host + "/gadget/crib-sw-storage-gadget.html"
)
})
.push(function (site_editor_gadget_url) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment