-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
octospacc
committed
Apr 13, 2024
1 parent
be537d1
commit 1105987
Showing
4 changed files
with
63 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
// Issue on Firefox 69 / Chromium: Getting background CSS property doesn't work, maybe background: url('') is invalid for <meta>? Maybe use content: ''? | ||
//var RawDataCss = JSON.parse(window.getComputedStyle(document.getElementById('RawDataCssInject')).background.split('url("')[1].split('")').slice(0, -1).join('")').replaceAll('\\\"', '\"')); | ||
|
||
/* Hyperbroken | ||
var MediaQuery = window.matchMedia(`(min-width: ${RawDataCss.DeskModeMinWid})`); | ||
var SectionMenu = document.querySelector('#RightBoxContainer > Details'); | ||
var SectionButton = SectionMenu.querySelector('Summary'); | ||
var NormalOpen = SectionMenu.open; | ||
SectionButton.onclick = function() { | ||
if (!MediaQuery.matches) { | ||
// For some reason without the ! it sets the opposite of what's really happening??? | ||
// Maybe the onclick event fires before the details element is actually opened by the click? | ||
NormalOpen = !SectionMenu.open; | ||
}; | ||
}; | ||
function MediaQueryCheck(Query) { | ||
if (MediaQuery.matches) SectionMenu.open = true; // Go in desktop mode | ||
else SectionMenu.open = NormalOpen; // Going in normal mode | ||
// we must when handle user manually disable desktop mode if we want hide the button | ||
//SectionButton.style.display = {true: "none", false: ""}[Query.matches]; | ||
}; | ||
MediaQuery.addListener(MediaQueryCheck); | ||
MediaQueryCheck(MediaQuery); | ||
*/ | ||
|
||
var BackgroundFilter = getComputedStyle(Background).filter; | ||
function ResetShowPageBg() { | ||
Background.onclick = null; | ||
Background.style.cursor = ''; | ||
Background.style.filter = BackgroundFilter; | ||
Body.style.overflow = ''; | ||
[Header, Container].forEach(function(El) { | ||
['visibility', 'overflow'].forEach(function(Prop) { | ||
El.style[Prop] = ''; | ||
}); | ||
}); | ||
}; | ||
|
||
function ShowPageBg() { | ||
[Header, Container].forEach(function(El) { | ||
['visibility', 'overflow'].forEach(function(Prop) { | ||
El.style[Prop] = 'hidden'; | ||
}); | ||
}); | ||
Body.style.overflow = 'hidden'; | ||
Background.style.filter = 'none'; | ||
Background.style.cursor = 'pointer'; | ||
Background.onclick = ResetShowPageBg; | ||
}; | ||
|
||
var PageBgEl = document.getElementById('fn:PageBg'); | ||
if (PageBgEl) { | ||
var PageBgPar = PageBgEl.querySelector('p'); | ||
var PageBgTokens = PageBgPar.innerHTML.split('</a>'); | ||
PageBgPar.innerHTML = PageBgTokens[0] + '</a> <button onclick="ShowPageBg()">Guarda</button>' + PageBgTokens.slice(1, -1); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
<!-- Temporarily disabled for bad taste: | ||
<script src="https://hub.octt.eu.org/Assets/JS/CurrentAge.js"></script> | ||
<script src="[staticoso:SiteRelativeRoot]Assets/BDPayload.js"></script> | ||
--> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters