Skip to content
This repository has been archived by the owner on Aug 18, 2023. It is now read-only.

Commit

Permalink
🍪 bring back settings btn
Browse files Browse the repository at this point in the history
  • Loading branch information
eramdam committed Aug 7, 2016
1 parent 6c1a8bf commit a9f447b
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
4 changes: 4 additions & 0 deletions src/css/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,10 @@
}
}

.btd-settings-btn .icon {
color: #009cf0;
}

.js-add-emojis .btd-emoji-icon {
background-image: url('../emojis/emoji-happy.svg');
}
Expand Down
10 changes: 10 additions & 0 deletions src/js/content.js
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,16 @@ on('BTDC_ready', () => {
setInterval(refreshTimestamps, TIMESTAMP_INTERVAL);
Emojis.buildEmojiPicker();

const settingsURL = chrome.extension.getURL('options/options.html');
const settingsBtn = `
<a class="btd-settings-btn js-header-action link-clean cf app-nav-link padding-hl" data-title="Better TweetDeck Settings"> <div class="obj-left"> <i class="icon icon-sliders icon-large"></i> </div> <div class="nbfc padding-ts hide-condensed">Better TweetDeck Settings</div> </a>
`;
$('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}`;
Expand Down
2 changes: 1 addition & 1 deletion src/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -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:"
}

0 comments on commit a9f447b

Please sign in to comment.