mehr layout die zweite
This commit is contained in:
7
public/mobile/css/w0bmcustom.css
vendored
7
public/mobile/css/w0bmcustom.css
vendored
@@ -3579,4 +3579,11 @@ input#collapsible[type='checkbox'] {
|
||||
|
||||
div.content-inner {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
button.layoutbutton {
|
||||
width: 100%;
|
||||
margin-bottom: 5px;
|
||||
background: black;
|
||||
color: white;
|
||||
}
|
@@ -1410,3 +1410,19 @@ function draw( video, thecanvas, img ){
|
||||
var dataURL = thecanvas.toDataURL();
|
||||
img.setAttribute('src', dataURL);
|
||||
} */
|
||||
|
||||
const infoboxContent = document.querySelector("button#infobox");
|
||||
if(infoboxContent)
|
||||
infoboxContent.dataset.content = infoboxContent.dataset.content.replace(/(https?:\/\/[^\s]+)/g, "<a href='$1' target='_blank' rel='extern'>$1</a>");
|
||||
|
||||
//This was supposed to work for urls that are not in a correct url-sheme such as z0r.de/1337 but ehm itz out of biz cuz uhm xD https://f0ck.it/uploads/%5B2019%5D_firefox_YapokIcyShoveler.png
|
||||
//infoboxContent.dataset.content = infoboxContent.dataset.content.replace(/((https?:\/\/)?[\w-]+(\.[\w-]+)+\.?(:\d+)?(\/\S*)?)?/gi, "<a href='$1'>$1</a>");
|
||||
|
||||
document.querySelectorAll("#layoutSwitcher [id^=layout]").forEach(el => el.addEventListener("click", async function(e) {
|
||||
e.preventDefault();
|
||||
const response = await fetch("/api/user/layout?layout=" + this.id.replace("layout", ""));
|
||||
if(response.ok)
|
||||
location.reload();
|
||||
else
|
||||
console.warn(response.status, await response.text());
|
||||
}));
|
Reference in New Issue
Block a user