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