kopia lustrzana https://github.com/lartsch/FediAct
use a fixed div for fediact running + go home button (easier to maintain and does not mess up the header)
rodzic
a26c0d2d02
commit
69041eccd5
|
@ -574,18 +574,7 @@ function showModal(settings) {
|
|||
|
||||
function addFediElements() {
|
||||
if (!$(".fediactrunning").length) {
|
||||
if ($("div.ui__header").is(":visible")) {
|
||||
$("a.ui__header__logo").remove()
|
||||
$("div.ui__header__links").prepend("<span class='fediactrunning'>FediAct running</span>")
|
||||
$("div.ui__header__links").append("<a target='" + settings.fediact_target + "' href='https://" + settings.fediact_homeinstance + "' class='button button-tertiary fediactgohome'><span>Go home</span></a>")
|
||||
} else if ($("nav.header").length) {
|
||||
$("nav.header a.brand").remove()
|
||||
$("nav.header div.nav-right").prepend("<span class='fediactrunning fediv3'>FediAct running</span>")
|
||||
$("nav.header div.nav-right").append("<a target='" + settings.fediact_target + "' class='webapp-btn nav-link nav-button fediactgohome' href='https://" + settings.fediact_homeinstance + "'>Go home</a>")
|
||||
} else if ($("div.sign-in-banner").length) {
|
||||
$("div.sign-in-banner").append("<a target='" + settings.fediact_target + "' href='https://" + settings.fediact_homeinstance + "' class='button button--block button-tertiary fediactgohome'><span>Go home</span></a>")
|
||||
$("div.sign-in-banner").append("<span class='fediactrunning'>FediAct running</p>")
|
||||
}
|
||||
$("body").append("<div class='fediactrunning'><span>FediAct running</span> - <a target='" + settings.fediact_target + "' href='https://" + settings.fediact_homeinstance + "'>Go home</a></div>")
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1419,7 +1408,6 @@ async function backgroundProcessor() {
|
|||
tmpSettings.processedFollow = []
|
||||
tmpSettings.isProcessing = []
|
||||
$(".fediactrunning").remove()
|
||||
$(".fediactgohome").remove()
|
||||
// rerun getSettings to keep mutes/blocks up to date while not reloading the page
|
||||
if (!await getSettings()) {
|
||||
// but reload if settings are invalid
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -70,15 +70,22 @@
|
|||
}
|
||||
|
||||
.fediactrunning {
|
||||
height: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
position: fixed;
|
||||
z-index: 99998;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background-color: rgba(0,0,0,0.7);
|
||||
color: white;
|
||||
margin: 0;
|
||||
padding: 10px 15px;
|
||||
}
|
||||
|
||||
.fediactrunning span {
|
||||
color: green;
|
||||
}
|
||||
|
||||
.fediactrunning.fediv3 {
|
||||
padding-right: 10px;
|
||||
.fediactrunning a {
|
||||
color: white;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1 +1 @@
|
|||
.fediactmodal{position:fixed;z-index:99999;left:0;top:0;width:100%;height:100%;overflow:auto;background-color:rgba(0,0,0,0.4);margin:0;padding:0}.fediactmodalinner{background-color:#494949;border:1px solid #888;width:50%;max-width:300px;left:50%;top:50%;transform:translate(-50%,-50%);position:absolute;margin:0;padding:0}.fediactmodallist{width:100%;margin:0;padding:0}.fediactmodalitem{cursor:pointer;width:100%;padding:5px 10px;box-sizing:border-box}.fediactmodallink{font-size:16px;cursor:pointer;text-decoration:none;color:white}.fediactprocessing{color:white;padding-right:10px;padding-left:10px}.fediactunresolved{color:orange;padding-right:10px;padding-left:10px}.fediactvoted{font-style:italic}.fediactvoted>a{font-weight:bold;color:orange}.fediactrunning{height:100%;display:flex;align-items:center;justify-content:center;color:green}.fediactrunning.fediv3{padding-right:10px}@-moz-keyframes nodeInserted{from{opacity:1}to{opacity:1}}@-webkit-keyframes nodeInserted{from{opacity:1}to{opacity:1}}@-ms-keyframes nodeInserted{from{opacity:1}to{opacity:1}}@-o-keyframes nodeInserted{from{opacity:1}to{opacity:1}}@keyframes nodeInserted{from{opacity:1}to{opacity:1}}div.status,div.detailed-status,div.detailed-status__action-bar,div.account__header button.logo-button,div.account__header button.button--follow,div.public-account-header a.logo-button,div.account-card a.logo-button,div.directory-card a.icon-button,div.detailed-status a.logo-button,button.remote-button,script#initial-state{-webkit-animation-name:nodeInserted !important;-webkit-animation-duration:.001s !important;-ms-animation-name:nodeInserted !important;-ms-animation-duration:.001s !important;-moz-animation-name:nodeInserted !important;-moz-animation-duration:.001s !important;-o-animation-name:nodeInserted !important;-o-animation-duration:.001s !important;animation-name:nodeInserted !important;animation-duration:.001s !important}
|
||||
.fediactmodal{position:fixed;z-index:99999;left:0;top:0;width:100%;height:100%;overflow:auto;background-color:rgba(0,0,0,0.4);margin:0;padding:0}.fediactmodalinner{background-color:#494949;border:1px solid #888;width:50%;max-width:300px;left:50%;top:50%;transform:translate(-50%,-50%);position:absolute;margin:0;padding:0}.fediactmodallist{width:100%;margin:0;padding:0}.fediactmodalitem{cursor:pointer;width:100%;padding:5px 10px;box-sizing:border-box}.fediactmodallink{font-size:16px;cursor:pointer;text-decoration:none;color:white}.fediactprocessing{color:white;padding-right:10px;padding-left:10px}.fediactunresolved{color:orange;padding-right:10px;padding-left:10px}.fediactvoted{font-style:italic}.fediactvoted>a{font-weight:bold;color:orange}.fediactrunning{position:fixed;z-index:99998;right:0;bottom:0;background-color:rgba(0,0,0,0.7);color:white;margin:0;padding:10px 15px}.fediactrunning span{color:green}.fediactrunning a{color:white}@-moz-keyframes nodeInserted{from{opacity:1}to{opacity:1}}@-webkit-keyframes nodeInserted{from{opacity:1}to{opacity:1}}@-ms-keyframes nodeInserted{from{opacity:1}to{opacity:1}}@-o-keyframes nodeInserted{from{opacity:1}to{opacity:1}}@keyframes nodeInserted{from{opacity:1}to{opacity:1}}div.status,div.detailed-status,div.detailed-status__action-bar,div.account__header button.logo-button,div.account__header button.button--follow,div.public-account-header a.logo-button,div.account-card a.logo-button,div.directory-card a.icon-button,div.detailed-status a.logo-button,button.remote-button,script#initial-state{-webkit-animation-name:nodeInserted !important;-webkit-animation-duration:.001s !important;-ms-animation-name:nodeInserted !important;-ms-animation-duration:.001s !important;-moz-animation-name:nodeInserted !important;-moz-animation-duration:.001s !important;-o-animation-name:nodeInserted !important;-o-animation-duration:.001s !important;animation-name:nodeInserted !important;animation-duration:.001s !important}
|
||||
|
|
Ładowanie…
Reference in New Issue