From a2f6aab453906bb9871cd740dc9758ca280bd573 Mon Sep 17 00:00:00 2001 From: isqua Date: Sat, 31 Jan 2015 14:05:15 +0300 Subject: [PATCH] Remove audio, soundclound and pleer.com original link option --- chrome_point_plus/_locales/en/messages.json | 7 ++-- chrome_point_plus/_locales/ru/messages.json | 7 ++-- chrome_point_plus/js/point-plus.js | 12 +++---- chrome_point_plus/options.html | 39 +++++++-------------- 4 files changed, 21 insertions(+), 44 deletions(-) diff --git a/chrome_point_plus/_locales/en/messages.json b/chrome_point_plus/_locales/en/messages.json index d34fa8f..74942bc 100644 --- a/chrome_point_plus/_locales/en/messages.json +++ b/chrome_point_plus/_locales/en/messages.json @@ -78,13 +78,10 @@ "message": "Leave original link" }, "option_embedding_soundcloud": { - "message": "Soundcloud ▼" - }, - "option_embedding_soundcloud_orig_link": { - "message": "Leave original link" + "message": "Soundcloud" }, "option_embedding_pleercom": { - "message": "Pleer.com ▼" + "message": "Pleer.com" }, "option_embedding_coubcom": { "message": "Coub.com" diff --git a/chrome_point_plus/_locales/ru/messages.json b/chrome_point_plus/_locales/ru/messages.json index 05a51e1..3ecbf23 100644 --- a/chrome_point_plus/_locales/ru/messages.json +++ b/chrome_point_plus/_locales/ru/messages.json @@ -78,13 +78,10 @@ "message": "Оставлять ссылку на видео" }, "option_embedding_soundcloud": { - "message": "Soundcloud ▼" - }, - "option_embedding_soundcloud_orig_link": { - "message": "Не убирать ссылку" + "message": "Soundcloud" }, "option_embedding_pleercom": { - "message": "Pleer.com ▼" + "message": "Pleer.com" }, "option_embedding_coubcom": { "message": "Coub.com" diff --git a/chrome_point_plus/js/point-plus.js b/chrome_point_plus/js/point-plus.js index 269d263..70b2cec 100644 --- a/chrome_point_plus/js/point-plus.js +++ b/chrome_point_plus/js/point-plus.js @@ -96,12 +96,10 @@ function PointPlus(ppVersion) { '); // Replace or prepend - if (options.is('option_embedding_soundcloud_orig_link')) { - // Before - $(this).before($player); - } else { - // Replace + if (options.is('option_embedding_remove_original_link')) { $(this).replaceWith($player); + } else { + $(this).before($player); } }); } @@ -919,7 +917,7 @@ function parse_all_audios(current_options){ obj.parentElement.insertBefore(player, obj); - if (current_options.is('option_audios_parse_leave_links', false)) { + if (current_options.is('option_embedding_remove_original_link')) { $(obj).hide(); } } @@ -984,7 +982,7 @@ function parse_pleercom_links(current_options) { '' + ''); - if ( ! current_options.is('option_embedding_pleercom_orig_link')) { + if (current_options.is('option_embedding_remove_original_link')) { $link.remove(); } } diff --git a/chrome_point_plus/options.html b/chrome_point_plus/options.html index 5fa18fa..b5377b0 100644 --- a/chrome_point_plus/options.html +++ b/chrome_point_plus/options.html @@ -82,35 +82,20 @@ -
- - + - -
+ -
- - - - -
- -
- - - - -
+