Skip to content

Commit

Permalink
dont show modal
Browse files Browse the repository at this point in the history
  • Loading branch information
dimdenGD committed Jun 13, 2024
1 parent 680079d commit 3550446
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions layouts/home/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,23 +77,23 @@ setTimeout(() => {
data.lastVersion.split('.').slice(0, data.lastVersion.split('.').length <= 3 ? 100 : -1).join('.') !== chrome.runtime.getManifest().version.split('.').slice(0, chrome.runtime.getManifest().version.split('.').length <= 3 ? 100 : -1).join('.')
) {
let opened = Date.now();
createModal(html`
<h2 style="margin:0;margin-bottom:10px;color:var(--darker-gray);font-weight:300">(OldTwitter) ${LOC.new_version.message} - ${chrome.runtime.getManifest().version}</h2>
<span id="changelog" style="font-size:14px;color:var(--default-text-color)">
<ul>
<li>Added viewing likes bypass lol</li>
</ul>
</span>
`, 'changelog-modal', () => {}, () => Date.now() - opened > 1250);
let changelog = document.getElementById('changelog');
let text = changelog.innerText;
let lang = LANGUAGE ? LANGUAGE : navigator.language ? navigator.language : "en";
if(!lang.startsWith('en')) {
changelog.innerHTML += html`<span class="tweet-translate">${LOC.view_translation.message}</span>`;
changelog.querySelector('.tweet-translate').addEventListener('click', () => {
openInNewTab('https://translate.google.com/?sl=en&tl=' + lang + '&text=' + encodeURIComponent(text) + '&op=translate');
});
}
// createModal(html`
// <h2 style="margin:0;margin-bottom:10px;color:var(--darker-gray);font-weight:300">(OldTwitter) ${LOC.new_version.message} - ${chrome.runtime.getManifest().version}</h2>
// <span id="changelog" style="font-size:14px;color:var(--default-text-color)">
// <ul>
// <li>Added viewing likes bypass lol</li>
// </ul>
// </span>
// `, 'changelog-modal', () => {}, () => Date.now() - opened > 1250);
// let changelog = document.getElementById('changelog');
// let text = changelog.innerText;
// let lang = LANGUAGE ? LANGUAGE : navigator.language ? navigator.language : "en";
// if(!lang.startsWith('en')) {
// changelog.innerHTML += html`<span class="tweet-translate">${LOC.view_translation.message}</span>`;
// changelog.querySelector('.tweet-translate').addEventListener('click', () => {
// openInNewTab('https://translate.google.com/?sl=en&tl=' + lang + '&text=' + encodeURIComponent(text) + '&op=translate');
// });
// }
chrome.storage.local.set({lastVersion: chrome.runtime.getManifest().version});
} else {
if(!data.nextPlug) {
Expand Down

0 comments on commit 3550446

Please sign in to comment.