Osaisiko joku auttaa, miksi tuo ilmoitusten punainen pylpyrä on pompannut tuonne sivupalkin oikeaan yläkulmaan, vaikka pitäisi olla tuon ilmoituspainikkeen oikeassa yläkulmassa? Tässä parin päivän sisällä tapahtunut.
On siis käytössä skripti jolla seuratut ja ilmoitukset painikkeet on sivupalkissa.
tossa skripti:
(() => {
'use strict';
const sopsy2 = document.getElementsByClassName("icon-bookmark2 followed-button")[0];
document.getElementById("nav-threads").appendChild(sopsy2);
var tyyli2 = document.createAttribute("style");
tyyli2.value = "width: 40px;height: 40px;font-size: 24px;margin-right: 15px;margin-top: 10px";
sopsy2.setAttributeNode(tyyli2);
const sopsy = document.getElementsByClassName("icon-alarm notifications-button")[0];
document.getElementById("nav-threads").appendChild(sopsy);
var tyyli = document.createAttribute("style");
tyyli.value = "width: 40px;height: 40px;font-size: 24px;margin-right: 15px;margin-top: 10px";
sopsy.setAttributeNode(tyyli);
document.getElementById("navbar").style.display = "none";
document.getElementById("sidebar").style.top = "0";
})();
ja tässä css jotka äkkisellä silmäyksellä voi vaikuttaa:
#content {
max-width: 100%;
}
#navbar {
max-width: 100%;
}
body {
max-width: 70%;
}
#content .navigation {
justify-content: left;
}
#sidebar nav#nav-threads{
display: inline-block;
}
#sidebar nav a{
padding: 2px;
}
nav#nav-threads button.followed-button span{
line-height: 1;
}
nav#nav-threads button.notifications-button span{
line-height: 1;
}
Hashtag
navbar
Remove ads with Gold »
You need a Gold subscription to see t
You need a Gold subscription to see
You need a Gold subscription to
You need a G
You n
You need a Gold subscription to see this po
You need a
You need a Gold subscription to see this pos
You need a Gold subscription to see this You need a
#board-selector {
flex-grow: 0;
margin-right: 0;
}
#sidebar::-webkit-scrollbar { display: none; }
#sidebar { overflow: hidden }
#navbar > span {
flex-grow: 0;
}
#sidebar #nav-boards button { display: none }
[data-timestamp][title]::after {
content: " • " attr(title);
}
:root { --body-max-width: 100%; }
/* Make thumbnail bakground black */
.post-file {
background-color: black;
}.post-file * .bg, .post-file .bg {
display: none;
}
.thread {
border-bottom: 5px solid maroon;
}
/* PC only */
@media (min-width: 401px) {
/* Make reply box size normal */
.post-form {
max-width: 1400px;
margin-left: auto;
margin-right: auto
}
/* Limit video and image sizes */
.post .file:not(.preview) img {
width: auto;
height: auto;
max-width: 1200px;
}figure[data-media-type="video"]:not(.preview) {
width: fit-content;
max-width: 1200px;
}
.poll
{ max-width: 600px; }
:root {
/* Set width to 100% and restore old font size */
--body-max-width: 100%;
Tietääkö joku miten saa tehtyä itse ilmoitukset- ja seuratut langat napit jotka toimii? Ohessa sivupalkin poistaja joka kloonaa nuo napit mutta niiden klikkaaminen ei tee mitään.
// ==UserScript==
// @name Remove sidebar - ylilauta.org
// @match *://ylilauta.org/*
// @version 1.3
// @grant none
// @author MrDarkHooD
// ==/UserScript==
function addGlobalStyle(css) {
const nonce = document.getElementsByTagName("script")[0].nonce;
const head = document.getElementsByTagName('head')[0];
const style = document.createElement('style');
style.type = 'text/css';
style.nonce = nonce;
style.innerHTML = css;
head.appendChild(style);
}
addGlobalStyle('body { padding-top: 5px !important; padding-bottom: 5px !important; }')
addGlobalStyle('#sidebar, #navbar { display: none; }')
addGlobalStyle('#content, html:not(.no-sidebar) #content { margin: 0 5px }')
// Add your own, or rather report missing names to author
const shortNames =
shortNames["anime"] = "a"
shortNames["satunnainen"] = "b"
shortNames["palaute"] = "meta"
shortNames["pub"] = "rr"
shortNames["matkailu"] = "coco"
shortNames["huumeet"] = "h"
shortNames["ohjelmointi"] = "o"
shortNames["masiinat"] = "m"
shortNames["musiikki"] = "mu"
shortNames["talous"] = "biz"
shortNames["pelit"] = "g"
shortNames["muoti"] = "fa"
shortNames["ihmissuhteet"] = "soc"
shortNames["deitti"] = "d"
const contentDiv = document.querySelector('#content');
const sideBar = document.getElementById("sidebar")
const notificationsButton = document.querySelector("[data-notifications-fn]")
const followedThreadsButton = document.querySelector("[data-thread-follow-box-fn]")
const tabs = ["[data-tab-id='profile']", "#nav-threads", "#nav-boards"]
let topBar = document.createElement('div');
topBar.setAttribute("id", "topBar");
contentDiv.prepend(topBar);
tabs.forEach((i, idx, tab) => {
const currentTab = sideBar.querySelector(tab[idx])
currentTab.querySelectorAll("nav a").forEach((link) => {
// Make board names shorter
if(currentTab.getAttribute("id") == "nav-boards") {
let boardUrlName = link.getAttribute("href").replace(/\//g, "")
if(shortNames[boardUrlName]) {
link.innerHTML = shortNames[boardUrlName]
}else {
link.innerHTML = boardUrlName
}
}
topBar.append(link, " / ")
});
if(idx === 0) {
topBar.append(notificationsButton)
topBar.append(" ")
topBar.append(followedThreadsButton)
}
topBar.innerHTML += "<br>"
});
//contentDiv.append(topBar.cloneNode(true));
Remove ads with Gold »