- Version on the options page

- New embedding options (not implemented yet)
This commit is contained in:
Alexey Skobkin 2014-04-05 02:09:49 +04:00
parent 1d1be29000
commit 2e89ca8966
5 changed files with 54 additions and 20 deletions

View File

@ -82,6 +82,7 @@ div#markItUpText-input {
margin: 0 5px 0 0;
padding: 10px;
border-radius: 0 0 15px 15px;
display: flex;
}
.pp-options .usual #panel button.button {
background-color: #C8C8C8;
@ -104,15 +105,6 @@ div#markItUpText-input {
position:relative;
top:1px;
}
/*
.pp-options .usual div#tabs-content div {
padding: 3px 0 0 0;
margin-top: -15px;
clear: left;
font: 10pt Georgia;
color: #FFF;
}
*/
.pp-options .usual div a {
color: #000;
@ -146,3 +138,20 @@ div#markItUpText-input {
color: #BBB;
}
/* Panel */
.pp-options .left, .pp-options .right {
width: 50%;
}
.pp-options .left {
float: left;
}
.pp-options .right {
float: right;
}
.pp-options #pp-version {
margin-top: 6px;
text-align: right;
}

View File

@ -147,7 +147,21 @@ function pp_restore_options() {
if (options.option_ws_feeds_blogs == true) {
document.getElementById('option-ws-feeds-blogs').checked = true;
}
// Showing version
document.getElementById('pp-version').innerHTML = 'Point+ ' + getVersion() + ' by <a href="http://skobkin-ru.point.im/" target="_blank">@skobkin-ru</a>';
});
}
document.addEventListener('DOMContentLoaded', pp_restore_options);
document.querySelector('#save').addEventListener('click', pp_save_options);
document.querySelector('#save').addEventListener('click', pp_save_options);
// Getting version from manifest.json
function getVersion() {
var xhr = new XMLHttpRequest();
xhr.open('GET', chrome.extension.getURL('manifest.json'), false);
xhr.send(null);
var manifest = JSON.parse(xhr.responseText);
return manifest.version;
}

View File

@ -325,14 +325,6 @@ function escapeHtml(text) {
.replace(/\n/g, "<br>");
}
function getVersion() {
var xhr = new XMLHttpRequest();
xhr.open('GET', chrome.extension.getURL('manifest.json'), false);
xhr.send(null);
var manifest = JSON.parse(xhr.responseText);
return manifest.version;
}
// Monts for Date.getMonth()
var months = [
'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',

View File

@ -1,7 +1,7 @@
{
"manifest_version": 2,
"name": "Point+",
"version": "1.6",
"version": "1.7",
"author": "Alexey Skobkin",
"homepage_url": "https://bitbucket.org/skobkin/chrome_point_plus",
"description": "More features for point.im",

View File

@ -37,6 +37,18 @@
<div class="option">
<input type="checkbox" id="option-images-load-original"><label for="option-images-load-original">Load original images instead of thumbnails
</div>
<div class="option">
<input type="checkbox" id="option-embedding"><label for="option-embedding">Enable embedding</label>
<div class="option">
<input type="checkbox" id="option-embedding-soundcloud"><label for="option-embedding-soundcloud">Soundcloud</label>
</div>
<div class="option">
<input type="checkbox" id="option-embedding-youtube" disabled><label for="option-embedding-youtube">YouTube</label>
</div>
</div>
</div>
<div class="tab-content" id="other">
@ -107,7 +119,14 @@
<div id="panel">
<div id="status"></div>
<button id="save" class="button">Save</button>
<div class="left">
<button id="save" class="button">Save</button>
</div>
<div class="right">
<div id="pp-version"></div>
</div>
</div>
</div>