diff --git a/src/css/index.css b/src/css/index.css index 62717c664..95adcde96 100644 --- a/src/css/index.css +++ b/src/css/index.css @@ -82,6 +82,10 @@ } } +.btd-settings-btn .icon { + color: #009cf0; +} + .js-add-emojis .btd-emoji-icon { background-image: url('../emojis/emoji-happy.svg'); } diff --git a/src/js/content.js b/src/js/content.js index 44f64d703..cb59bcd94 100644 --- a/src/js/content.js +++ b/src/js/content.js @@ -387,6 +387,16 @@ on('BTDC_ready', () => { setInterval(refreshTimestamps, TIMESTAMP_INTERVAL); Emojis.buildEmojiPicker(); + const settingsURL = chrome.extension.getURL('options/options.html'); + const settingsBtn = ` +
Better TweetDeck Settings
+ `; + $('nav.app-navigator')[0].insertAdjacentHTML('beforeend', settingsBtn); + $('.btd-settings-btn')[0].addEventListener('click', (e) => { + e.preventDefault(); + window.open(settingsURL); + }); + onMessage((details) => { document.dispatchEvent(new CustomEvent('uiComposeTweet')); $('textarea.js-compose-text')[0].value = `${details.text} ${details.url}`; diff --git a/src/manifest.json b/src/manifest.json index 077ea0a4d..6c9f6ca39 100644 --- a/src/manifest.json +++ b/src/manifest.json @@ -29,6 +29,6 @@ "page": "options/ui/ui.html", "chrome_style": false }, - "web_accessible_resources": ["js/inject.js", "js/content.js.map", "js/inject.js.map", "js/background.js.map", "emojis/sheet_twitter_64.png", "emojis/emoji-happy.svg", "icons/controller-play.svg"], + "web_accessible_resources": ["js/inject.js", "js/content.js.map", "js/inject.js.map", "js/background.js.map", "emojis/sheet_twitter_64.png", "emojis/emoji-happy.svg", "icons/controller-play.svg", "options/options.html"], "content_security_policy": "img-src 'self' *; default-src; connect-src * https:" }