Commit 323453ed authored by yPhil's avatar yPhil

Sys: Bookmarklet target _blank

parent 10d0c79b
......@@ -32,6 +32,5 @@
"feedparser": "2.2.9",
"feedrat": "latest",
"pm2": "2.8.0"
},
"cacheDirName": "favicon-cache"
}
}
......@@ -4,10 +4,9 @@
"script" : "./bin/www",
"watch" : true,
"ignore_watch" : ["favicons-cache"],
"favicons_cache" : "favicons-cache",
"log_date_format" : "YYYY-MM-DD HH:mm",
"env": {
"PORT": 8666,
"env" : {
"PORT" : 8666,
"FAVICONS_CACHE_DIR": "favicons-cache"
},
"env_production" : {
......
......@@ -719,6 +719,7 @@ button.ui-state-error {
padding: .4em;
}
.source-header > .source-handle,
.dialog .help-bookmarklet {
cursor: grab;
}
......@@ -1035,7 +1036,6 @@ li.feed {
background-color: transparent;
border-left: 3px dotted var(--color-oct);
border-right: 3px dotted var(--color-oct);
cursor:move;
flex-basis: 4px;
flex-grow: 0;
flex-shrink: var(--handle-flex-shrink);
......@@ -1087,8 +1087,16 @@ li.feed {
margin: var(--controls-toggle-margin);
}
.help-rss {
color: var(--color-ui-pri) !important;
}
.icon-rss {
color: var(--color-ui-rss) !important;
}
.icon-rss {
color: var(--color-ui-rss);
color: var(--color-ui-rss) !important;
}
li.source-item {
......@@ -1293,6 +1301,10 @@ div#logo-title {
float: right;
}
.icon-petrolette {
color: var(--color-ui-sec) !important;
}
.logoType i.icon-petrolette {
display:block;
cursor: pointer;
......
......@@ -77,10 +77,10 @@ PTL.dialog = {
}
});
$('.rssDocLink').attr('href', 'https://' + PTL.language + '.wikipedia.org/wiki/RSS');
$('.help-rss').attr('href', 'https://' + PTL.language + '.wikipedia.org/wiki/RSS');
$dialog.dialog({
title: PTL.tr('Source'),
title: isNewFeed ? PTL.tr('New source') : PTL.tr('Source'),
autoOpen: false,
closeOnEscape: true,
resizable: true,
......
......@@ -26,6 +26,10 @@ var PTL = (function() {
$(this).toggleClass('expanded');
});
$('body').on('click','.help-bookmarklet', function(event) {
event.preventDefault();
});
PTL.sync.attachWidget();
$('button').button();
......@@ -52,7 +56,7 @@ var PTL = (function() {
}
PTL.sideMenu('close');
PTL.src.add($column, 'New Feed', 'mixed', 8, true, false);
PTL.src.add($column, PTL.tr('New source'), 'mixed', 8, true, false);
});
$sourceCodeButton.click(function(event) {
......
......@@ -193,7 +193,7 @@ PTL.util = {
},
{
element: 'li.feed',
intro: PTL.tr('This is a source. ') + '<a href="https://' + PTL.language + '.wikipedia.org/wiki/RSS">' + PTL.tr('More info') + '</a>'
intro: PTL.tr('This is a source. ') + '<a class="ui-button ui-corner-all icon-rss" href="https://' + PTL.language + '.wikipedia.org/wiki/RSS">' + PTL.tr('More info') + '</a>'
},
{
element: 'div#newSourceButton',
......@@ -230,7 +230,7 @@ PTL.util = {
steps: [
{
element: 'input#feed-guess',
intro: '<span class="translate" data-content="Enter a website address/URL and click search, then OK, or simply enter the URL of the">' + PTL.tr('Enter a website address/URL and click search, then OK, or simply enter the URL of the') + '</span> <a class="rssDocLink" href="https://' + PTL.language + '.wikipedia.org/wiki/RSS">' + PTL.tr('source') + '</a>. <span class="translate" data-content="Heck, enter anything, and Pétrolette will build a source from your search query.">' + PTL.tr('Heck, enter anything, and Pétrolette will build a source from your search query.') + '</span>',
intro: '<span class="translate" data-content="Enter a website address/URL and click search, then OK, or simply enter the URL of the">' + PTL.tr('Enter a website address/URL and click search, then OK, or simply enter the URL of the') + '</span> <a class="help-rss" href="https://' + PTL.language + '.wikipedia.org/wiki/RSS">' + PTL.tr('source') + '</a>. <span class="translate" data-content="Heck, enter anything, and Pétrolette will build a source from your search query.">' + PTL.tr('Heck, enter anything, and Pétrolette will build a source from your search query.') + '</span>',
position: 'bottom'
},
{
......
......@@ -156,7 +156,7 @@
<span class="translate"
data-content="Pétrolette uses a time-tested technology">
Pétrolette uses a time-tested technology
</span>: <a class="ui-button help-button icon-rss rssDocLink" href="https://wikipedia.org/wiki/RSS">RSS</a>.
</span>: <a class="ui-button help-button icon-rss help-rss" href="https://wikipedia.org/wiki/RSS">RSS</a>.
<span class="translate"
data-content="Create sources and organize them into groups.">
......@@ -228,7 +228,7 @@
<span class="dialog translate"
data-content="You can also drag this button to your bookmark toolbar, and click it when you want to add a website to Pétrolette">
You can also drag this button to your bookmark toolbar, and click it when you want to add a website to Pétrolette</span>:
<a href="javascript:(function() {window.location='http://petrolette.space/?source=' + window.location.toString();})()"
<a href="javascript:void(window.open('http://petrolette.space/?source=' + window.location.href))"
icon="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAABp0lEQVRYhe2WO0sDURCFT2Z28QeonZ2N9qKVmMrsfaSwiI9S24D2QkC0zS+wF2zVUhCbIHb2FoJ2IlYpbPRYKEnWu5tofGCxF7YZZs/5zuywXNDoBq3c02qLPirjlw99VKbV1rvnOujkkU7ZeYwc0mBioFANykTXmOgqa9CB/QYTNHKY8nLyAHq9SBeVtNKmwTYNRvok2eu+E+32MR6hwTattEMfbYEG4/RyQCsvQYOTa1r4TGGrZz1CZ9k98HRynRHwhV4OaDDekyiepdPLEEJJp6d0mE4n0/PuZ9PzD6kn6fUkW6t0xQrms8dVg9KiHuzFG/UTDRqDAGjQoJWnjGk+0qL+mX0Bqxijk306eQ6EKlGSB8BFmAzjZzrZZxVjA40DEBvPBEvqsZUL4LGV7tUL2njmy8bhNIYEGCZ1AVAAFAAFQAFQAAQASxhNiSbYzAVIsJnqXcLo9wF2ILRy15NqIRfAR+VuTW4JlL4NAAB0mKaLmqzocqeWeyPSFbqoySqmfsQ8F6rPnfBPTgFQAPwHgOOen87R3wMsxnO0ckMrN/Tx7LA6r5V4Lpl2TCixAAAAAElFTkSuQmCC"
class="help-button help-bookmarklet translate icon-petrolette"
data-title="Drag to the bookmark bar"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment