mirror of
https://github.com/FreshRSS/FreshRSS.git
synced 2026-04-04 14:43:32 -04:00
CSP for bookmarklet (subscription)
https://github.com/FreshRSS/FreshRSS/issues/1075
This commit is contained in:
@@ -10,7 +10,7 @@
|
||||
</li>
|
||||
|
||||
<li class="item">
|
||||
<a onclick="return false;" href="javascript:(function(){var%20url%20=%20location.href;window.open('<?php echo Minz_Url::display(array('c' => 'feed', 'a' => 'add'), 'html', true); ?>&url_rss='+encodeURIComponent(url), '_blank');})();">
|
||||
<a class="bookmarkClick" href="javascript:(function(){var%20url%20=%20location.href;window.open('<?php echo Minz_Url::display(array('c' => 'feed', 'a' => 'add'), 'html', true); ?>&url_rss='+encodeURIComponent(url), '_blank');})();">
|
||||
<?php echo _t('sub.menu.bookmark'); ?>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
@@ -1245,6 +1245,12 @@ function init_configuration_alert() {
|
||||
});
|
||||
}
|
||||
|
||||
function init_subscription() {
|
||||
$('body').on('click', '.bookmarkClick', function (e) {
|
||||
return false;
|
||||
});
|
||||
}
|
||||
|
||||
function parseJsonVars() {
|
||||
var jsonVars = document.getElementById('jsonVars'),
|
||||
json = JSON.parse(jsonVars.innerHTML);
|
||||
@@ -1281,6 +1287,7 @@ function init_all() {
|
||||
init_notifs_html5();
|
||||
window.setInterval(refreshUnreads, 120000);
|
||||
} else {
|
||||
init_subscription();
|
||||
init_crypto_form();
|
||||
init_share_observers();
|
||||
init_remove_observers();
|
||||
|
||||
Reference in New Issue
Block a user