Only show RT button if there is a real tweet ID (fixes #27)
This commit is contained in:
Родитель
08a669c737
Коммит
2533aff2fc
|
@ -70,7 +70,7 @@
|
|||
</div>
|
||||
|
||||
<div class="hidden" id="tweets-container">
|
||||
<a class="btn btn-big" id="official-tweet" data-l10n-id="official-tweet-cta">Retweet official tweet</a>
|
||||
<a class="btn btn-big hidden" id="official-tweet" data-l10n-id="official-tweet-cta">Retweet official tweet</a>
|
||||
<span id="official-tweet-id" class="hidden" data-l10n-id="official-tweet-id"></span>
|
||||
|
||||
<div id="tweets-examples-container">
|
||||
|
|
|
@ -32,7 +32,12 @@ function updateTweets() {
|
|||
|
||||
var officialTweet = document.querySelector('#official-tweet');
|
||||
var tweetId = document.querySelector('#official-tweet-id').textContent;
|
||||
officialTweet.href = 'https://twitter.com/intent/retweet?tweet_id=' + tweetId;
|
||||
if (tweetId !== 'tbd') {
|
||||
officialTweet.href = 'https://twitter.com/intent/retweet?tweet_id=' + tweetId;
|
||||
officialTweet.classList.remove('hidden');
|
||||
} else {
|
||||
officialTweet.classList.add('hidden');
|
||||
}
|
||||
|
||||
var tweet1 = document.querySelector('[data-l10n-id="tweet-1"]');
|
||||
var link1 = document.querySelector('#tweet-link1');
|
||||
|
|
|
@ -16,4 +16,4 @@ license = Lizenz
|
|||
guidelines = Richtlinien
|
||||
mozilla-description =
|
||||
Mozilla ist eine globale Non-Profit Organisation, die Dir die Kontrolle über Deine Online-Erlebnisse zurückgibt und sich für eine bessere Zukunft des Internet einsetzt - für alle! Besuch uns hier: <a href="https://mozilla.org" target="_blank">mozilla.org</a>
|
||||
official-tweet-id = 928033132908986369
|
||||
official-tweet-id = tbd
|
||||
|
|
|
@ -18,4 +18,4 @@ mozilla-description =
|
|||
Mozilla is a global non-profit dedicated to putting you in control of your online experience and shaping the future
|
||||
of the web for the public good. Visit us at
|
||||
<a href="https://mozilla.org" target="_blank">mozilla.org</a>
|
||||
official-tweet-id = 928033132908986369
|
||||
official-tweet-id = tbd
|
||||
|
|
|
@ -18,4 +18,4 @@ mozilla-description =
|
|||
Mozilla es una organización global sin fines de lucro dedicada a ponerte en control de tu experiencia en linea y dando forma al futuro
|
||||
de la web por el bien general. Visitanos en
|
||||
<a href="https://mozilla.org" target="_blank">mozilla.org</a>
|
||||
official-tweet-id = 928033132908986369
|
||||
official-tweet-id = tbd
|
||||
|
|
|
@ -16,4 +16,4 @@ license = Licence
|
|||
guidelines = Directives relatives à la participation
|
||||
mozilla-description =
|
||||
Mozilla est un organisme mondial à but non lucratif, qui œuvre pour que les utilisateurs gardent le contrôle de leur vie en ligne et pour défendre le Web en tant que bien commun. Apprenez-en davantage sur <a href="https://mozilla.org" target="_blank">mozilla.org</a>
|
||||
official-tweet-id = 928033132908986369
|
||||
official-tweet-id = tbd
|
||||
|
|
|
@ -16,4 +16,4 @@ license = Licença
|
|||
guidelines = Diretrizes
|
||||
mozilla-description =
|
||||
A Mozilla é uma organização sem fins lucrativos global que coloca você no controle da sua experiência on-line, moldando o futuro da web para o bem público geral. Visite-nos em <a href="https://mozilla.org" target="_blank">mozilla.org</a>
|
||||
official-tweet-id = 928033132908986369
|
||||
official-tweet-id = tbd
|
||||
|
|
Загрузка…
Ссылка в новой задаче