update chrome extension

This commit is contained in:
slynn1324 2021-01-25 14:23:28 -06:00
parent e6c3f9a175
commit a1b9613857
5 changed files with 7723 additions and 53 deletions

File diff suppressed because it is too large Load diff

View file

@ -1,6 +1,6 @@
{
"name": "add to tinypin",
"version": "1.0",
"version": "1.0.0",
"description": "add to tinypin context menu plugin",
"manifest_version": 2,
"background" : { "scripts": ["background.js"] },

View file

@ -2,18 +2,28 @@
<html>
<head>
<title>tinypin options</title>
<link rel="stylesheet" href="./bulma-custom.css" />
</head>
<body style="font-size: 1em;">
<body>
<label for="server">server url</label>
<div>
<input type="text" id="server" style="width: 95%; font-size: 1em;"/>
</div>
<div class="secton">
<div class="content" style="margin: 10px;">
<div class="field">
<label class="label">tinypin server url</label>
<div class="control">
<input class="input" id="server" type="text">
</div>
</div>
<button class="button is-success" id="save">Save</button>
<span id="status" style="line-height: 2.5em; color: #3273dc;"></span>
<div style="margin-top: 20px;">
<button id="save">Save</button>
<span id="status" style="color: green;"></span>
</div>
</div>

View file

@ -1,18 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta name="google" content="notranslate">
</head>
<body>
<div>
image src: <span id="imageSrc"></span>
</div>
<div>
website url: <span id="siteUrl"></span>
</div>
<script src="popup.js"></script>
</body>
</html>

View file

@ -1,26 +0,0 @@
let hash = window.location.hash;
if ( hash.length > 0 && hash.indexOf(0) == "#" ){
hash = hash.substr(1);
}
let q = parseQueryString(window.location.hash.substr(1));
document.getElementById("imageSrc").innerText = q.i || "";
document.getElementById("siteUrl").innerText = q.s || "";
function parseQueryString(qs){
let obj = {};
let parts = qs.split("&");
for ( let i = 0; i < parts.length; ++i ){
let kv = parts[i].split("=");
if ( kv.length == 2 ){
let key = decodeURIComponent(kv[0]);
let value = decodeURIComponent(kv[1]);
obj[key] = value;
}
}
return obj;
}