Remove audio, soundclound and pleer.com original link option

This commit is contained in:
isqua 2015-01-31 14:05:15 +03:00
parent 82c2ef8442
commit a2f6aab453
4 changed files with 21 additions and 44 deletions

View file

@ -78,13 +78,10 @@
"message": "Leave original link" "message": "Leave original link"
}, },
"option_embedding_soundcloud": { "option_embedding_soundcloud": {
"message": "Soundcloud ▼" "message": "Soundcloud"
},
"option_embedding_soundcloud_orig_link": {
"message": "Leave original link"
}, },
"option_embedding_pleercom": { "option_embedding_pleercom": {
"message": "Pleer.com ▼" "message": "Pleer.com"
}, },
"option_embedding_coubcom": { "option_embedding_coubcom": {
"message": "Coub.com" "message": "Coub.com"

View file

@ -78,13 +78,10 @@
"message": "Оставлять ссылку на видео" "message": "Оставлять ссылку на видео"
}, },
"option_embedding_soundcloud": { "option_embedding_soundcloud": {
"message": "Soundcloud ▼" "message": "Soundcloud"
},
"option_embedding_soundcloud_orig_link": {
"message": "Не убирать ссылку"
}, },
"option_embedding_pleercom": { "option_embedding_pleercom": {
"message": "Pleer.com ▼" "message": "Pleer.com"
}, },
"option_embedding_coubcom": { "option_embedding_coubcom": {
"message": "Coub.com" "message": "Coub.com"

View file

@ -96,12 +96,10 @@ function PointPlus(ppVersion) {
</div>'); </div>');
// Replace or prepend // Replace or prepend
if (options.is('option_embedding_soundcloud_orig_link')) { if (options.is('option_embedding_remove_original_link')) {
// Before
$(this).before($player);
} else {
// Replace
$(this).replaceWith($player); $(this).replaceWith($player);
} else {
$(this).before($player);
} }
}); });
} }
@ -919,7 +917,7 @@ function parse_all_audios(current_options){
obj.parentElement.insertBefore(player, obj); 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(); $(obj).hide();
} }
} }
@ -984,7 +982,7 @@ function parse_pleercom_links(current_options) {
'<embed src="' + trackHref + '" type="application/x-shockwave-flash" width="578" height="60">' + '<embed src="' + trackHref + '" type="application/x-shockwave-flash" width="578" height="60">' +
'</embed></object>'); '</embed></object>');
if ( ! current_options.is('option_embedding_pleercom_orig_link')) { if (current_options.is('option_embedding_remove_original_link')) {
$link.remove(); $link.remove();
} }
} }

View file

@ -82,35 +82,20 @@
</label> </label>
</div> </div>
<div class="option-node"> <label class="option-node">
<input type="checkbox" name="option-audios-parse-links" id="option-audios-parse-links"> <input type="checkbox" name="option-audios-parse-links">
<label for="option-audios-parse-links" data-i18n="option_audios_parse_links"></label> <span data-i18n="option_audios_parse_links"></span>
</label>
<label class="option-node"> <label class="option-node">
<input type="checkbox" name="option-audios-parse-leave-links"> <input type="checkbox" name="option-embedding-soundcloud">
<span data-i18n="option_embedding_soundcloud_orig_link"></span> <span data-i18n="option_embedding_soundcloud"></span>
</label> </label>
</div>
<div class="option-node"> <label class="option-node">
<input type="checkbox" name="option-embedding-soundcloud" id="option-embedding-soundcloud"> <input type="checkbox" name="option-embedding-pleercom">
<label for="option-embedding-soundcloud" data-i18n="option_embedding_soundcloud"></label> <span data-i18n="option_embedding_pleercom"></span>
</label>
<label class="option-node">
<input type="checkbox" name="option-embedding-soundcloud-orig-link">
<span data-i18n="option_embedding_soundcloud_orig_link"></span>
</label>
</div>
<div class="option-node">
<input type="checkbox" name="option-embedding-pleercom" id="option-embedding-pleercom">
<label for="option-embedding-pleercom" data-i18n="option_embedding_pleercom"></label>
<label class="option-node">
<input type="checkbox" name="option-embedding-pleercom-orig-link">
<span data-i18n="option_embedding_soundcloud_orig_link"></span>
</label>
</div>
<label class="option-node"> <label class="option-node">
<input type="checkbox" name="option-embedding-coubcom"> <input type="checkbox" name="option-embedding-coubcom">