Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open links in background / better german translation #304

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@

2. Installing

<del>Check it at the [chrome web store](https://chrome.google.com/webstore/detail/encaiiljifbdbjlphpgpiimidegddhic)</del>

[Download it directly from GitHub](https://github.com/downloads/cezarsa/silver_bird/silver_bird_1.9.8.1.crx)
Check it at the [chrome web store](https://chrome.google.com/webstore/detail/encaiiljifbdbjlphpgpiimidegddhic)
or
[Download it from GitHub](https://github.com/downloads/cezarsa/silver_bird/downloads)

3. Compatibility

Expand Down
7 changes: 5 additions & 2 deletions _locales/az/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -467,6 +467,9 @@
"l_hover_timeout": {
"message": "Oxumaq üçün üzərində gözləmə müddəti (ms):"
},
"l_background_url": {
"message": "Open links in background?"
},
"l_show_expanded_urls": {
"message": "Qısaldılmış ünvanları genişlət:"
},
Expand Down Expand Up @@ -672,10 +675,10 @@
"message": "Trendlər"
},
"g_trending_topics": {
"message": "Trend mövzular"
"message": "Trend mövzular"
},
"l_trending_topics_woeid": {
"message": "Yerlər üzrə trend mövzular:"
"message": "Yerlər üzrə trend mövzular:"
},
"l_use_streaming_api": {
"message": "Axın APİ-si istifadə edin (sınaqda!):"
Expand Down
38 changes: 37 additions & 1 deletion _locales/de/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -458,6 +458,9 @@
"l_hover_timeout": {
"message": "Als Gelesen markieren nach (ms):"
},
"l_background_url": {
"message": "Links im Hintergrund öffnen?"
},
"l_show_expanded_urls": {
"message": "Verkürzte URLs auflösen:"
},
Expand Down Expand Up @@ -524,13 +527,28 @@
"l_notification_fade_timeout": {
"message": "Benachrichtigungs-Timeout (s):"
},
"l_notification_max_popups": {
"message": "Maximale Benachrichtigungen (-1: alle):"
},
"l_notify_retweets": {
"message": "Benachrichtigen bei Retweets von meinen Tweets?"
},
"l_notify_rt_always": {
"message": "Immer"
},
"l_notify_rt_only_first": {
"message": "Nur den ersten (Retweet)"
},
"l_notify_rt_never": {
"message": "Niemals"
},
"g_shortener": {
"message": "Verkürzer"
},
"l_url_shortener": {
"message": "URL-Verkürzer:"
},
"l_shortener_acct": {
"l_shortener_oauth": {
"message": "Privates Konto nutzen?"
},
"l_shortener_login": {
Expand All @@ -542,6 +560,18 @@
"l_share_include_title": {
"message": "Seiten-Titel mit angeben (beim Teilen):"
},
"g_image_service": {
"message": "Bilder"
},
"l_image_up_service": {
"message": "Bilder hochladen bei:"
},
"g_trending_topics": {
"message": "Trends"
},
"l_trending_topics_woeid": {
"message": "Von welchem Land?"
},
"g_timelines": {
"message": "Timelines"
},
Expand Down Expand Up @@ -608,6 +638,12 @@
"l_base_search_url": {
"message": "Such-API-URL:"
},
"l_use_streaming_api": {
"message": "Streaming API nutzen? (experimentell)"
},
"l_user_stream_url": {
"message": "User Stream URL:"
},
"btn_save": {
"message": "Speicheren"
},
Expand Down
7 changes: 5 additions & 2 deletions _locales/en/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -467,6 +467,9 @@
"l_hover_timeout": {
"message": "Hover to read time (ms):"
},
"l_background_url": {
"message": "Open links in background?"
},
"l_show_expanded_urls": {
"message": "Expand shortened URLs:"
},
Expand Down Expand Up @@ -672,10 +675,10 @@
"message": "Trends"
},
"g_trending_topics": {
"message": "Trending Topics"
"message": "Trending Topics"
},
"l_trending_topics_woeid": {
"message": "Trending Topics Locale:"
"message": "Trending Topics Locale:"
},
"l_use_streaming_api": {
"message": "Use streaming API (experimental!):"
Expand Down
3 changes: 3 additions & 0 deletions _locales/es/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -458,6 +458,9 @@
"l_hover_timeout": {
"message": "Marcar como leído en (ms):"
},
"l_background_url": {
"message": "Open links in background?"
},
"l_show_expanded_urls": {
"message": "Expandir URLs acortadas:"
},
Expand Down
7 changes: 5 additions & 2 deletions _locales/gl_ES/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -458,6 +458,9 @@
"l_hover_timeout": {
"message": "Marcar coma leído en (ms):"
},
"l_background_url": {
"message": "Open links in background?"
},
"l_show_expanded_urls": {
"message": "Expandir URLs acortadas:"
},
Expand Down Expand Up @@ -663,10 +666,10 @@
"message": "Tendencias"
},
"g_trending_topics": {
"message": "Asuntos de moda"
"message": "Asuntos de moda"
},
"l_trending_topics_woeid": {
"message": "Locale dos asuntos de moda:"
"message": "Locale dos asuntos de moda:"
},
"l_use_streaming_api": {
"message": "Use streaming API (experimental!):"
Expand Down
7 changes: 5 additions & 2 deletions _locales/pt_BR/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -462,6 +462,9 @@
"l_hover_timeout": {
"message": "Marcar como lido em (ms):"
},
"l_background_url": {
"message": "Open links in background?"
},
"l_show_expanded_urls": {
"message": "Expandir URLs encurtadas:"
},
Expand Down Expand Up @@ -667,10 +670,10 @@
"message": "Trends"
},
"g_trending_topics": {
"message": "Trending Topics"
"message": "Trending Topics"
},
"l_trending_topics_woeid": {
"message": "Local dos Trending Topics:"
"message": "Local dos Trending Topics:"
},
"l_use_streaming_api": {
"message": "Usar a API de streaming (experimental!):"
Expand Down
5 changes: 4 additions & 1 deletion _locales/ru/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"message": "Показать "
},
"add": {
"message": "Добавить"
"message": "Добавить"
},
"selectList": {
"message": "- списки -"
Expand Down Expand Up @@ -458,6 +458,9 @@
"l_hover_timeout": {
"message": "Время чтения (мс):"
},
"l_background_url": {
"message": "Open links in background?"
},
"l_show_expanded_urls": {
"message": "Разворачивать короткие ссылки:"
},
Expand Down
3 changes: 3 additions & 0 deletions _locales/tr/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -458,6 +458,9 @@
"l_hover_timeout": {
"message": "Okumak için üzerinde bekleme süresi (ms):"
},
"l_background_url": {
"message": "Open links in background?"
},
"l_show_expanded_urls": {
"message": "Kısaltılmış adresleri genişlet:"
},
Expand Down
3 changes: 3 additions & 0 deletions _locales/uk/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -458,6 +458,9 @@
"l_hover_timeout": {
"message": "Час читання (мс):"
},
"l_background_url": {
"message": "Open links in background?"
},
"l_show_expanded_urls": {
"message": "Розгортати короткі посилання:"
},
Expand Down
21 changes: 8 additions & 13 deletions lib/tweets_assembler.js
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -150,19 +150,11 @@ var Renderer = {

transformTweetText: Transforms.transformFactory([
{
//create links (based on John Gruber's pattern from
//http://daringfireball.net/2009/11/liberal_regex_for_matching_urls
//
//I wish JavaScript had character classes
'expression': /\b((([\w-]+):\/\/?|www[.])[^\s()<>]+((\([\w\d]+\))|([^,.;:'"`~\s]|\/)))/i,
// from "Clickable links" extension, modified a bit to work even better

'expression': /((?:https?|ftp):\/\/[^\s'"'<>()]+|www\.[^\s'"'<>()]+|[\-\w.+]+@(?:[\-\w]+\.)+[\w]{2,6})/i,
'replacement': function() {
var url = RegExp.$1;
var scheme = RegExp.$3;

if (scheme && !(/^(https?|ftp)$/i.exec(scheme))) {
// possibly dangerous scheme, suppress it
return document.createTextNode(url);
}

var hrefObj = document.createElement("a");
hrefObj.setAttribute("href", url);
Expand All @@ -180,7 +172,7 @@ var Renderer = {
},
{
//create hash search links
'expression': /([^&\w]|^)(#([\w\u0080-\uffff]*))((?=([^<])*?<a)|(?!.*?<\/a>))/i,
'expression': /([^&\w]|^)([#\uff03]([\w\u0080-\uffff]*))((?=([^<])*?<a)|(?!.*?<\/a>))/i,
'replacement': function() {
var header = RegExp.$1;
var label = RegExp.$2;
Expand Down Expand Up @@ -707,7 +699,10 @@ var Renderer = {
};

function openTab(tabUrl) {
var background = false;
if(!OptionsBackend.get('background_url'))
var background = false;
else
background = true;
if(event) {
if(event.button == 2) {
return true;
Expand Down
4 changes: 3 additions & 1 deletion options.html
Original file line number Diff line number Diff line change
Expand Up @@ -353,9 +353,11 @@ <h1 class="i18n" id="options_title">Silver Bird Options</h1>
<label for="default_locale" class="i18n" id="l_default_locale">Default Locale:</label>
<select name="default_locale"></select><br>
<label for="font_family" id="l_font_family" class="i18n">Font Family:</label>
<input type="text" style="width: 20em"; name="font_family" validator="required"><br>
<input type="text" style="width: 20em" name="font_family" validator="required"><br>
<label for="hover_timeout" class="i18n" id="l_hover_timeout">Hover to read time (ms):</label>
<input type="text" name="hover_timeout" validator="required,number,positive"><br>
<label for="background_url" class="i18n" id="l_background_url">Open links in background?</label>
<input type="checkbox" id="background_url" name="background_url" /><br>
<label for="show_expanded_urls" class="i18n" id="l_show_expanded_urls">Expand shortened URLs:</label>
<input type="checkbox" id="show_expanded_urls" name="show_expanded_urls" /><br>
<label for="reply_all" class="i18n" id="l_reply_all">Reply to all mentioned:</label>
Expand Down