mirror of
https://bitbucket.org/skobkin/chrome_point_plus.git
synced 2024-12-29 09:36:58 +00:00
parent
09583da801
commit
27bca63a00
|
@ -16,7 +16,9 @@ var ppOptions = [
|
|||
// Comments
|
||||
'option_ws_comments', 'option_ws_comments_color_fadeout', 'option_ws_comments_notifications',
|
||||
// Feeds
|
||||
'option_ws_feeds', 'option_ws_feeds_subscriptions', 'option_ws_feeds_blogs'
|
||||
'option_ws_feeds', 'option_ws_feeds_subscriptions', 'option_ws_feeds_blogs',
|
||||
// Font size
|
||||
'option_enlarge_font', 'option_enlarge_font_size'
|
||||
];
|
||||
|
||||
// Saves options to localStorage.
|
||||
|
@ -55,6 +57,10 @@ function pp_save_options() {
|
|||
var option_ws_feeds_subscriptions = document.getElementById('option-ws-feeds-subscriptions');
|
||||
// Blogs
|
||||
var option_ws_feeds_blogs = document.getElementById('option-ws-feeds-blogs');
|
||||
// Font size
|
||||
var option_enlarge_font = document.getElementById('option-enlarge-font');
|
||||
// Size ratio
|
||||
var option_enlarge_font_size = document.querySelector('input[name="pp-font-size"]:checked');
|
||||
|
||||
// Saving parameters
|
||||
chrome.storage.sync.set({
|
||||
|
@ -73,7 +79,9 @@ function pp_save_options() {
|
|||
'option_ws_comments_notifications': option_ws_comments_notifications.checked,
|
||||
'option_ws_feeds': option_ws_feeds.checked,
|
||||
'option_ws_feeds_subscriptions': option_ws_feeds_subscriptions.checked,
|
||||
'option_ws_feeds_blogs': option_ws_feeds_blogs.checked
|
||||
'option_ws_feeds_blogs': option_ws_feeds_blogs.checked,
|
||||
'option_enlarge_font': option_enlarge_font.checked,
|
||||
'option_enlarge_font_size': option_enlarge_font_size.value
|
||||
}, function() {
|
||||
// Update status to let user know options were saved.
|
||||
var status = document.getElementById('status');
|
||||
|
@ -158,6 +166,14 @@ function pp_restore_options() {
|
|||
if (options.option_ws_feeds_blogs == true) {
|
||||
document.getElementById('option-ws-feeds-blogs').checked = true;
|
||||
}
|
||||
// Font size
|
||||
if (options.option_enlarge_font == true) {
|
||||
document.getElementById('option-enlarge-font').checked = true;
|
||||
}
|
||||
// Size ratio
|
||||
if (options.option_enlarge_font_size !== undefined) {
|
||||
document.getElementById('option-enlarge-font-' + options.option_enlarge_font_size).checked = true;
|
||||
}
|
||||
|
||||
// Showing version
|
||||
document.getElementById('pp-version').innerHTML = 'Point+ ' + getVersion() + ' by <a href="http://skobkin-ru.point.im/" target="_blank">@skobkin-ru</a>';
|
||||
|
|
|
@ -319,6 +319,10 @@ $(document).ready(function() {
|
|||
}
|
||||
;
|
||||
};
|
||||
}
|
||||
// Font size
|
||||
if ((options.option_enlarge_font == true) && (options.option_enlarge_font_size !== undefined)) {
|
||||
$('body').css('font-size', (options.option_enlarge_font_size / 100) + 'em');
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"manifest_version": 2,
|
||||
"name": "Point+",
|
||||
"version": "1.7",
|
||||
"version": "1.8",
|
||||
"author": "Alexey Skobkin",
|
||||
"homepage_url": "https://bitbucket.org/skobkin/chrome_point_plus",
|
||||
"description": "More features for point.im",
|
||||
|
@ -52,6 +52,7 @@
|
|||
"http://*.point.im/*",
|
||||
"https://*.point.im/*",
|
||||
"storage",
|
||||
"notifications"
|
||||
"notifications",
|
||||
"tabs"
|
||||
]
|
||||
}
|
|
@ -35,7 +35,7 @@
|
|||
</div>
|
||||
|
||||
<div class="option">
|
||||
<input type="checkbox" id="option-images-load-original"><label for="option-images-load-original">Load original images instead of thumbnails
|
||||
<input type="checkbox" id="option-images-load-original"><label for="option-images-load-original">Load original images instead of thumbnails</label>
|
||||
</div>
|
||||
|
||||
<div class="option">
|
||||
|
@ -61,11 +61,21 @@
|
|||
</div>
|
||||
|
||||
<div class="option">
|
||||
<input type="checkbox" id="option-visual-editor-post"><label for="option-visual-editor-post">Show visual editor for posts
|
||||
<input type="checkbox" id="option-visual-editor-post"><label for="option-visual-editor-post">Show visual editor for posts</label>
|
||||
</div>
|
||||
|
||||
<div class="option">
|
||||
<input type="checkbox" id="option-search-with-google"><label for="option-search-with-google">Use Google search in header
|
||||
<input type="checkbox" id="option-search-with-google"><label for="option-search-with-google">Use Google search in header</label>
|
||||
</div>
|
||||
|
||||
<div class="option">
|
||||
<input type="checkbox" id="option-enlarge-font"><label for="option-enlarge-font">Enlarge font size</label>
|
||||
|
||||
<div class="option">
|
||||
<input name="pp-font-size" id="option-enlarge-font-85" type="radio" value="85" checked="checked"><label for="option-enlarge-font-85">0.85em</label>
|
||||
<input name="pp-font-size" id="option-enlarge-font-100" type="radio" value="100"><label for="option-enlarge-font-100">1em</label>
|
||||
<input name="pp-font-size" id="option-enlarge-font-110" type="radio" value="110"><label for="option-enlarge-font-110">1.1em</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
Loading…
Reference in a new issue