...
 
Commits (2)
{
"manifest_version": 2,
"name" : "Shorten URL",
"description" : "Create shortened URL from long URL",
"description" : "Create shortened URL from a long URL",
"homepage_url": "https://url.itunix.eu/",
"version": "1.2",
"version": "1.2.1",
"icons": {
"48": "icons/icon-48.png",
......
......@@ -15,17 +15,17 @@
<input type="text" placeholder="URL to shortening" id="urltext" />
<button id="urlclick" class="button">Submit</button>
<input type="text" id="shorturl" style="display:none;" />
<p id="info">Past URL in text box and click submit</p>
<p id="info">Paste an URL in text box and click submit button.</p>
</section>
<section class="flexbox" id="setapi">
<p id="info">Enter Server and API Key to get started</p>
<p id="info">Enter server and API key to get started.</p>
<input type="text" placeholder="API Server" value="https://url.itunix.eu" id="apiserver" />
<input type="text" placeholder="API Key" id="apikey" />
<button id="apiclick" class="button">Save</button>
</section>
<button id="clearapi" style="display: none;">Remove Api-Key</button>
<button id="clearapi" style="display: none;">Remove API key</button>
<script src="popup.js"></script>
</body>
......
......@@ -48,7 +48,7 @@ function shortUrl(apikey, long_url) {
}
}
var apiserver = localStorage.getItem('apiserver');
xhttp.open("POST", apiserver+"/short", true);
xhttp.open("POST", apiserver+"/shorten", true);
xhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
xhttp.send("long_url="+long_url+"&apikey="+apikey);
}
......