mirror of
https://bitbucket.org/skobkin/chrome_point_plus.git
synced 2024-11-23 18:56:04 +00:00
Small options refactoring. Gelbooru and WEBM moved to the embedding section.
This commit is contained in:
parent
7a23b3a518
commit
6951f07bdd
|
@ -1,10 +1,22 @@
|
||||||
var ppOptions = [
|
var ppOptions = [
|
||||||
// Fancybox
|
// Fancybox
|
||||||
'option_fancybox', 'option_fancybox_images', 'option_fancybox_videos', 'option_fancybox_posts',
|
'option_fancybox',
|
||||||
|
// Open images in Fancybox
|
||||||
|
'option_fancybox_images',
|
||||||
|
// Open videos in Fancybox
|
||||||
|
'option_fancybox_videos',
|
||||||
|
// Open posts in Fancybox
|
||||||
|
'option_fancybox_posts',
|
||||||
// CTRL+Enter
|
// CTRL+Enter
|
||||||
'option_ctrl_enter',
|
'option_ctrl_enter',
|
||||||
// Load original images
|
// Load original images
|
||||||
'option_images_load_original',
|
'option_images_load_original',
|
||||||
|
// Embedding
|
||||||
|
'option_embedding',
|
||||||
|
// Load images from Gelbooru, Danbooru, etc
|
||||||
|
'option_images_load_booru',
|
||||||
|
// Wrap WEBM videos into the <video> tag
|
||||||
|
'option_videos_parse_webm',
|
||||||
// Fluid layout
|
// Fluid layout
|
||||||
'option_fluid_layout',
|
'option_fluid_layout',
|
||||||
// Visual editor for posts
|
// Visual editor for posts
|
||||||
|
@ -21,13 +33,9 @@ var ppOptions = [
|
||||||
'option_enlarge_font', 'option_enlarge_font_size',
|
'option_enlarge_font', 'option_enlarge_font_size',
|
||||||
// @ before username
|
// @ before username
|
||||||
'option_at_before_username',
|
'option_at_before_username',
|
||||||
//
|
// Highlight posts with new comments
|
||||||
'option_images_load_booru',
|
|
||||||
//
|
|
||||||
'option_videos_parse_webm',
|
|
||||||
//
|
|
||||||
'option_other_hightlight_post_comments',
|
'option_other_hightlight_post_comments',
|
||||||
//
|
// Show recommendations and unique comments count
|
||||||
'option_other_show_recommendation_count',
|
'option_other_show_recommendation_count',
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -48,6 +56,8 @@ function pp_save_options() {
|
||||||
var option_fluid_layout = document.getElementById('option-layout-fluid');
|
var option_fluid_layout = document.getElementById('option-layout-fluid');
|
||||||
// Load original images
|
// Load original images
|
||||||
var option_images_load_original = document.getElementById('option-images-load-original');
|
var option_images_load_original = document.getElementById('option-images-load-original');
|
||||||
|
// Embedding
|
||||||
|
var option_embedding = document.getElementById('option-embedding');
|
||||||
// Visual editor for posts
|
// Visual editor for posts
|
||||||
var option_visual_editor_post = document.getElementById('option-visual-editor-post');
|
var option_visual_editor_post = document.getElementById('option-visual-editor-post');
|
||||||
// Google search
|
// Google search
|
||||||
|
@ -83,6 +93,7 @@ function pp_save_options() {
|
||||||
'option_fancybox_posts': option_fancybox_posts.checked,
|
'option_fancybox_posts': option_fancybox_posts.checked,
|
||||||
'option_fluid_layout': option_fluid_layout.checked,
|
'option_fluid_layout': option_fluid_layout.checked,
|
||||||
'option_images_load_original': option_images_load_original.checked,
|
'option_images_load_original': option_images_load_original.checked,
|
||||||
|
'option_embedding': option_embedding.checked,
|
||||||
'option_visual_editor_post': option_visual_editor_post.checked,
|
'option_visual_editor_post': option_visual_editor_post.checked,
|
||||||
'option_search_with_google': checkbox_search_with_google.checked,
|
'option_search_with_google': checkbox_search_with_google.checked,
|
||||||
'option_ws': option_ws.checked,
|
'option_ws': option_ws.checked,
|
||||||
|
@ -144,6 +155,10 @@ function pp_restore_options() {
|
||||||
if (options.option_images_load_original == true) {
|
if (options.option_images_load_original == true) {
|
||||||
document.getElementById('option-images-load-original').checked = true;
|
document.getElementById('option-images-load-original').checked = true;
|
||||||
}
|
}
|
||||||
|
// Embedding
|
||||||
|
if (options.option_embedding == true) {
|
||||||
|
document.getElementById('option-embedding').checked = true;
|
||||||
|
}
|
||||||
// Visual editor for posts
|
// Visual editor for posts
|
||||||
if (options.option_visual_editor_post == true) {
|
if (options.option_visual_editor_post == true) {
|
||||||
document.getElementById('option-visual-editor-post').checked = true;
|
document.getElementById('option-visual-editor-post').checked = true;
|
||||||
|
|
|
@ -42,6 +42,18 @@ $(document).ready(function() {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Embedding
|
||||||
|
if (options.option_embedding == true) {
|
||||||
|
// Load pictures from Booru, Tumblr and some other sites
|
||||||
|
if (options.option_images_load_booru == true){
|
||||||
|
load_all_booru_images();
|
||||||
|
}
|
||||||
|
// Parse webm-links and create video instead
|
||||||
|
if (options.option_videos_parse_webm == true){
|
||||||
|
parse_webm();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Hotkeys
|
// Hotkeys
|
||||||
// Send by CTRL+Enter
|
// Send by CTRL+Enter
|
||||||
|
@ -333,14 +345,6 @@ $(document).ready(function() {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// Load pictures from Booru, Tumblr and some other sites
|
|
||||||
if (options.option_images_load_booru == true){
|
|
||||||
load_all_booru_images();
|
|
||||||
}
|
|
||||||
// Parse webm-links and create video instead
|
|
||||||
if (options.option_videos_parse_webm == true){
|
|
||||||
parse_webm();
|
|
||||||
}
|
|
||||||
// Hightlight post with new comments
|
// Hightlight post with new comments
|
||||||
if (options.option_other_hightlight_post_comments == true){
|
if (options.option_other_hightlight_post_comments == true){
|
||||||
mark_unread_post();
|
mark_unread_post();
|
||||||
|
|
|
@ -39,22 +39,18 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="option">
|
<div class="option">
|
||||||
<input type="checkbox" id="option-images-load-booru"><label for="option-images-load-booru">Load pictures from Booru, Tumblr and some other sites</label>
|
<input type="checkbox" id="option-embedding"><label for="option-embedding">Enable embedding</label>
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="option">
|
|
||||||
<input type="checkbox" id="option-videos-parse-webm"><label for="option-videos-parse-webm">Parse webm-links and create video instead</label>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="option">
|
|
||||||
<input type="checkbox" id="option-embedding" disabled><label for="option-embedding">Enable embedding</label>
|
|
||||||
|
|
||||||
<div class="option">
|
<div class="option">
|
||||||
<input type="checkbox" id="option-embedding-soundcloud"><label for="option-embedding-soundcloud">Soundcloud</label>
|
<input type="checkbox" id="option-images-load-booru"><label for="option-images-load-booru">Load pictures from Booru, Tumblr and some other sites</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="option">
|
||||||
|
<input type="checkbox" id="option-videos-parse-webm"><label for="option-videos-parse-webm">Parse webm-links and create video instead</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="option">
|
<div class="option">
|
||||||
<input type="checkbox" id="option-embedding-youtube" disabled><label for="option-embedding-youtube">YouTube</label>
|
<input type="checkbox" id="option-embedding-soundcloud" disabled="disabled"><label for="option-embedding-soundcloud">Soundcloud</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue