diff --git a/Core/FormNotification.cs b/Core/FormNotification.cs index 504c5361..34db8d67 100644 --- a/Core/FormNotification.cs +++ b/Core/FormNotification.cs @@ -3,7 +3,6 @@ using CefSharp.WinForms; using System.Drawing; using System; -using System.Text; using System.Collections.Generic; using TweetDick.Core.Handling; diff --git a/Core/Handling/ContextMenuHandler.cs b/Core/Handling/ContextMenuHandler.cs index 41c33d78..e4cc70a5 100644 --- a/Core/Handling/ContextMenuHandler.cs +++ b/Core/Handling/ContextMenuHandler.cs @@ -1,5 +1,4 @@ using CefSharp; -using System; namespace TweetDick.Core.Handling{ class ContextMenuHandler : IContextMenuHandler{ diff --git a/Resources/code.js b/Resources/code.js index 6c0a9777..491d1136 100644 --- a/Resources/code.js +++ b/Resources/code.js @@ -18,19 +18,20 @@ // Function: Initializes TweetDick events. Called after the website app is loaded. // var initializeTweetDick = function(){ + // Settings button hook $("[data-action='settings-menu']").click(function(){ setTimeout(function(){ var menu = $(".js-dropdown-content").children("ul").first(); if (menu.length == 0)return; - + menu.children(".drp-h-divider").last().after('<li class="is-selectable" data-tweetdick><a href="#" data-action>TweetDick</a></li><li class="drp-h-divider"></li>'); - - var tweetDickBtn = menu.children("[data-tweetdick]"); - + + var tweetDickBtn = menu.children("[data-tweetdick]").first(); + tweetDickBtn.on("click","a",function(){ $TD.openSettingsMenu(); }); - + tweetDickBtn.hover(function(){ $(this).addClass("is-selected"); },function(){