mirror of
https://github.com/slynn1324/tinypin.git
synced 2026-01-23 02:25:08 +00:00
update chrome extension
This commit is contained in:
parent
e6c3f9a175
commit
a1b9613857
5 changed files with 7723 additions and 53 deletions
7704
chrome-extension/bulma-custom.css
Normal file
7704
chrome-extension/bulma-custom.css
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -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"] },
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
@ -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;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue