diff --git a/layouts/home/script.js b/layouts/home/script.js index 79a1f4e5..5415e065 100644 --- a/layouts/home/script.js +++ b/layouts/home/script.js @@ -77,23 +77,29 @@ 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` - //

(OldTwitter) ${LOC.new_version.message} - ${chrome.runtime.getManifest().version}

- // - // - // - // `, '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`${LOC.view_translation.message}`; - // changelog.querySelector('.tweet-translate').addEventListener('click', () => { - // openInNewTab('https://translate.google.com/?sl=en&tl=' + lang + '&text=' + encodeURIComponent(text) + '&op=translate'); - // }); - // } + createModal(html` +

(OldTwitter) ${LOC.new_version.message} - ${chrome.runtime.getManifest().version}

+ + + + `, '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`${LOC.view_translation.message}`; + 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) { diff --git a/manifest.json b/manifest.json index 29ccbe67..3fcb509b 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "name": "Old Twitter Layout (2024)", "description": "__MSG_ext_description__", - "version": "1.8.6", + "version": "1.8.7", "manifest_version": 3, "homepage_url": "https://github.com/dimdenGD/OldTwitter", "background": {