mirror of
https://github.com/chylex/TweetDuck.git
synced 2025-04-07 09:15:50 +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){
|
||||
FormMessage.Information("No Updates Available", "Your version of TweetDuck is up to date.", FormMessage.OK);
|
||||
}
|
||||
|
||||
// TODO allow outside TweetDeck
|
||||
}, 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){
|
||||
IFrame frame = e.Frame;
|
||||
|
||||
if (frame.IsMain && TwitterUtils.IsTweetDeckWebsite(frame)){
|
||||
UpdateProperties();
|
||||
TweetDeckBridge.RestoreSessionData(frame);
|
||||
ScriptLoader.ExecuteFile(frame, "code.js", browser);
|
||||
if (frame.IsMain){
|
||||
if (TwitterUtils.IsTweetDeckWebsite(frame)){
|
||||
UpdateProperties();
|
||||
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);
|
||||
|
||||
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;
|
||||
color: #fff;
|
||||
background-color: rgb(32, 94, 138);
|
||||
font-family: Helvetica, Arial, Verdana, sans-serif;
|
||||
text-align: center;
|
||||
text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.5);
|
||||
line-height: 1.28578;
|
||||
transition: transform 400ms cubic-bezier(.02, .01, .47, 1);
|
||||
}
|
||||
|
||||
@ -67,6 +69,8 @@
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: rgba(0, 0, 0, 0.5);
|
||||
font-family: Helvetica, Arial, Verdana, sans-serif;
|
||||
line-height: 1.28578;
|
||||
z-index: 9998;
|
||||
}
|
||||
|
||||
@ -82,14 +86,16 @@
|
||||
overflow-y: auto;
|
||||
transform: translateX(-50%) translateY(-50%);
|
||||
font-size: 14px;
|
||||
color: #000;
|
||||
color: #2f2f2f;
|
||||
background-color: #fff;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
#tweetduck-changelog h2 {
|
||||
margin: 0 0 7px;
|
||||
margin: 0 0 8px;
|
||||
color: #5c6973;
|
||||
font-size: 23px;
|
||||
line-height: 1.28578;
|
||||
}
|
||||
|
||||
#tweetduck-changelog h2 + br {
|
||||
@ -98,7 +104,9 @@
|
||||
|
||||
#tweetduck-changelog h3 {
|
||||
margin: 0 0 5px 7px;
|
||||
color: #065b9c;
|
||||
font-size: 18px;
|
||||
line-height: 1.28578;
|
||||
}
|
||||
|
||||
#tweetduck-changelog p {
|
||||
|
@ -132,13 +132,16 @@
|
||||
//
|
||||
// Block: Check updates on startup.
|
||||
//
|
||||
if ("$" in window && typeof $._data === "function" && "TD" in $._data(document, "events")){
|
||||
$(document).one("TD.ready", function(){
|
||||
$TDU.triggerUpdateCheck();
|
||||
});
|
||||
}
|
||||
else{
|
||||
const triggerCheck = function(){
|
||||
$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