mirror of
https://github.com/chylex/TweetDuck.git
synced 2025-04-26 03:15:48 +02:00
Update current plugins to use the new CSS functionality
This commit is contained in:
parent
be77f753e7
commit
47935165db
Resources/Plugins
@ -11,4 +11,7 @@ chylex
|
||||
1.0
|
||||
|
||||
[website]
|
||||
https://tweetduck.chylex.com
|
||||
https://tweetduck.chylex.com
|
||||
|
||||
[requires]
|
||||
1.4.1
|
@ -62,14 +62,11 @@ enabled(){
|
||||
].join(""));
|
||||
|
||||
// load custom style
|
||||
var style = document.createElement("style");
|
||||
document.head.appendChild(style);
|
||||
|
||||
var sheet = style.sheet;
|
||||
sheet.insertRule(".column-title { margin-right: 60px !important; }", 0);
|
||||
sheet.insertRule(".column-type-message .column-title { margin-right: 115px !important; }", 0);
|
||||
sheet.insertRule(".mark-all-read-link { right: 59px !important; }", 0);
|
||||
sheet.insertRule(".open-compose-dm-link { right: 90px !important; }", 0);
|
||||
var css = window.TDPF_createCustomStyle(this);
|
||||
css.insert(".column-title { margin-right: 60px !important; }");
|
||||
css.insert(".column-type-message .column-title { margin-right: 115px !important; }");
|
||||
css.insert(".mark-all-read-link { right: 59px !important; }");
|
||||
css.insert(".open-compose-dm-link { right: 90px !important; }");
|
||||
}
|
||||
|
||||
ready(){
|
||||
|
@ -12,4 +12,7 @@ chylex
|
||||
1.0
|
||||
|
||||
[website]
|
||||
https://tweetduck.chylex.com
|
||||
https://tweetduck.chylex.com
|
||||
|
||||
[requires]
|
||||
1.4.1
|
@ -1,15 +1,11 @@
|
||||
enabled(){
|
||||
// add a stylesheet to change tweet actions
|
||||
var style = document.createElement("style");
|
||||
style.id = "design-revert";
|
||||
document.head.appendChild(style);
|
||||
|
||||
var sheet = style.sheet;
|
||||
sheet.insertRule(".tweet-actions { float: right !important; width: auto !important; }", 0);
|
||||
sheet.insertRule(".tweet-action { opacity: 0; }", 0);
|
||||
sheet.insertRule(".is-favorite .tweet-action, .is-retweet .tweet-action { opacity: 0.5; visibility: visible !important; }", 0);
|
||||
sheet.insertRule(".tweet:hover .tweet-action, .is-favorite .tweet-action[rel='favorite'], .is-retweet .tweet-action[rel='retweet'] { opacity: 1; visibility: visible !important; }", 0);
|
||||
sheet.insertRule(".tweet-actions > li:nth-child(4) { margin-right: 2px !important; }", 0);
|
||||
this.css = window.TDPF_createCustomStyle(this);
|
||||
this.css.insert(".tweet-actions { float: right !important; width: auto !important; }");
|
||||
this.css.insert(".tweet-action { opacity: 0; }");
|
||||
this.css.insert(".is-favorite .tweet-action, .is-retweet .tweet-action { opacity: 0.5; visibility: visible !important; }");
|
||||
this.css.insert(".tweet:hover .tweet-action, .is-favorite .tweet-action[rel='favorite'], .is-retweet .tweet-action[rel='retweet'] { opacity: 1; visibility: visible !important; }");
|
||||
this.css.insert(".tweet-actions > li:nth-child(4) { margin-right: 2px !important; }");
|
||||
|
||||
// revert small links around the tweet
|
||||
this.prevFooterMustache = TD.mustaches["status/tweet_single_footer.mustache"];
|
||||
@ -31,7 +27,8 @@ ready(){
|
||||
}
|
||||
|
||||
disabled(){
|
||||
$("#design-revert").remove();
|
||||
this.css.remove();
|
||||
|
||||
$(document).off("uiShowActionsMenu", this.uiShowActionsMenuEvent);
|
||||
TD.mustaches["status/tweet_single_footer.mustache"] = this.prevFooterMustache;
|
||||
}
|
@ -12,4 +12,7 @@ chylex
|
||||
1.0
|
||||
|
||||
[website]
|
||||
https://tweetduck.chylex.com
|
||||
https://tweetduck.chylex.com
|
||||
|
||||
[requires]
|
||||
1.4.1
|
@ -6,12 +6,8 @@ constructor(){
|
||||
|
||||
enabled(){
|
||||
// add a stylesheet
|
||||
var style = document.createElement("style");
|
||||
style.id = "timeline-polls";
|
||||
document.head.appendChild(style);
|
||||
|
||||
var sheet = style.sheet;
|
||||
sheet.insertRule(".column-detail .timeline-poll-container { display: none }", 0);
|
||||
this.css = window.TDPF_createCustomStyle(this);
|
||||
this.css.insert(".column-detail .timeline-poll-container { display: none }");
|
||||
|
||||
// setup layout injecting
|
||||
this.prevMustaches = {};
|
||||
@ -29,6 +25,6 @@ enabled(){
|
||||
}
|
||||
|
||||
disabled(){
|
||||
$("#timeline-polls").remove();
|
||||
this.css.remove();
|
||||
Object.keys(this.prevMustaches).forEach(mustache => TD.mustaches[mustache] = this.prevMustaches[mustache]);
|
||||
}
|
Loading…
Reference in New Issue
Block a user