mirror of
https://github.com/chylex/TweetDuck.git
synced 2025-04-10 18:15:44 +02:00
Add update notifications outside TweetDeck, tweak changelog styling
This commit is contained in:
parent
db9daf2714
commit
6dffdcd1ed
Core
Resources/Scripts
@ -219,8 +219,6 @@ private void updates_CheckFinished(object sender, UpdateCheckEventArgs e){
|
|||||||
if (update.VersionTag == Program.VersionTag){
|
if (update.VersionTag == Program.VersionTag){
|
||||||
FormMessage.Information("No Updates Available", "Your version of TweetDuck is up to date.", FormMessage.OK);
|
FormMessage.Information("No Updates Available", "Your version of TweetDuck is up to date.", FormMessage.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO allow outside TweetDeck
|
|
||||||
}, ex => {
|
}, ex => {
|
||||||
Program.Reporter.HandleException("Update Check Error", "An error occurred while checking for updates.", true, ex);
|
Program.Reporter.HandleException("Update Check Error", "An error occurred while checking for updates.", true, ex);
|
||||||
});
|
});
|
||||||
|
@ -146,25 +146,28 @@ private void browser_FrameLoadStart(object sender, FrameLoadStartEventArgs e){
|
|||||||
private void browser_FrameLoadEnd(object sender, FrameLoadEndEventArgs e){
|
private void browser_FrameLoadEnd(object sender, FrameLoadEndEventArgs e){
|
||||||
IFrame frame = e.Frame;
|
IFrame frame = e.Frame;
|
||||||
|
|
||||||
if (frame.IsMain && TwitterUtils.IsTweetDeckWebsite(frame)){
|
if (frame.IsMain){
|
||||||
UpdateProperties();
|
if (TwitterUtils.IsTweetDeckWebsite(frame)){
|
||||||
TweetDeckBridge.RestoreSessionData(frame);
|
UpdateProperties();
|
||||||
ScriptLoader.ExecuteFile(frame, "code.js", browser);
|
TweetDeckBridge.RestoreSessionData(frame);
|
||||||
|
ScriptLoader.ExecuteFile(frame, "code.js", browser);
|
||||||
|
|
||||||
|
InjectBrowserCSS();
|
||||||
|
ReinjectCustomCSS(Program.UserConfig.CustomBrowserCSS);
|
||||||
|
UserConfig_SoundNotificationInfoChanged(null, EventArgs.Empty);
|
||||||
|
|
||||||
|
TweetDeckBridge.ResetStaticProperties();
|
||||||
|
|
||||||
|
if (Arguments.HasFlag(Arguments.ArgIgnoreGDPR)){
|
||||||
|
ScriptLoader.ExecuteScript(frame, "TD.storage.Account.prototype.requiresConsent = function(){ return false; }", "gen:gdpr");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Program.UserConfig.FirstRun){
|
||||||
|
ScriptLoader.ExecuteFile(frame, "introduction.js", browser);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
ScriptLoader.ExecuteFile(frame, "update.js", browser);
|
ScriptLoader.ExecuteFile(frame, "update.js", browser);
|
||||||
|
|
||||||
InjectBrowserCSS();
|
|
||||||
ReinjectCustomCSS(Program.UserConfig.CustomBrowserCSS);
|
|
||||||
UserConfig_SoundNotificationInfoChanged(null, EventArgs.Empty);
|
|
||||||
|
|
||||||
TweetDeckBridge.ResetStaticProperties();
|
|
||||||
|
|
||||||
if (Arguments.HasFlag(Arguments.ArgIgnoreGDPR)){
|
|
||||||
ScriptLoader.ExecuteScript(frame, "TD.storage.Account.prototype.requiresConsent = function(){ return false; }", "gen:gdpr");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (Program.UserConfig.FirstRun){
|
|
||||||
ScriptLoader.ExecuteFile(frame, "introduction.js", browser);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6,8 +6,10 @@
|
|||||||
z-index: 9999;
|
z-index: 9999;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
background-color: rgb(32, 94, 138);
|
background-color: rgb(32, 94, 138);
|
||||||
|
font-family: Helvetica, Arial, Verdana, sans-serif;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.5);
|
text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.5);
|
||||||
|
line-height: 1.28578;
|
||||||
transition: transform 400ms cubic-bezier(.02, .01, .47, 1);
|
transition: transform 400ms cubic-bezier(.02, .01, .47, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -67,6 +69,8 @@
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
background-color: rgba(0, 0, 0, 0.5);
|
background-color: rgba(0, 0, 0, 0.5);
|
||||||
|
font-family: Helvetica, Arial, Verdana, sans-serif;
|
||||||
|
line-height: 1.28578;
|
||||||
z-index: 9998;
|
z-index: 9998;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -82,14 +86,16 @@
|
|||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
transform: translateX(-50%) translateY(-50%);
|
transform: translateX(-50%) translateY(-50%);
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
color: #000;
|
color: #2f2f2f;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
#tweetduck-changelog h2 {
|
#tweetduck-changelog h2 {
|
||||||
margin: 0 0 7px;
|
margin: 0 0 8px;
|
||||||
|
color: #5c6973;
|
||||||
font-size: 23px;
|
font-size: 23px;
|
||||||
|
line-height: 1.28578;
|
||||||
}
|
}
|
||||||
|
|
||||||
#tweetduck-changelog h2 + br {
|
#tweetduck-changelog h2 + br {
|
||||||
@ -98,7 +104,9 @@
|
|||||||
|
|
||||||
#tweetduck-changelog h3 {
|
#tweetduck-changelog h3 {
|
||||||
margin: 0 0 5px 7px;
|
margin: 0 0 5px 7px;
|
||||||
|
color: #065b9c;
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
|
line-height: 1.28578;
|
||||||
}
|
}
|
||||||
|
|
||||||
#tweetduck-changelog p {
|
#tweetduck-changelog p {
|
||||||
|
@ -132,13 +132,16 @@
|
|||||||
//
|
//
|
||||||
// Block: Check updates on startup.
|
// Block: Check updates on startup.
|
||||||
//
|
//
|
||||||
if ("$" in window && typeof $._data === "function" && "TD" in $._data(document, "events")){
|
const triggerCheck = function(){
|
||||||
$(document).one("TD.ready", function(){
|
|
||||||
$TDU.triggerUpdateCheck();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
$TDU.triggerUpdateCheck();
|
$TDU.triggerUpdateCheck();
|
||||||
|
};
|
||||||
|
|
||||||
|
try{
|
||||||
|
throw false if !($._data(document, "events").TD.some(obj => obj.namespace === "ready"));
|
||||||
|
|
||||||
|
$(document).one("TD.ready", triggerCheck);
|
||||||
|
}catch(err){
|
||||||
|
setTimeout(triggerCheck, 500);
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
Loading…
Reference in New Issue
Block a user