mirror of
https://github.com/chylex/TweetDuck.git
synced 2025-04-18 06:15:49 +02:00
Fix broken notification scrolling in CEF 65 properly
This commit is contained in:
parent
3c03726634
commit
07de2f450c
@ -70,7 +70,7 @@ public string GenerateHtml(string bodyClasses){
|
|||||||
build.Append(' ').Append(bodyClasses);
|
build.Append(' ').Append(bodyClasses);
|
||||||
}
|
}
|
||||||
|
|
||||||
build.Append('\'').Append(isExample ? " td-example-notification" : "").Append("><div class='column' style='width:100%!important;height:auto!important;overflow:initial!important;'>");
|
build.Append('\'').Append(isExample ? " td-example-notification" : "").Append("><div class='column' style='width:100%!important;min-height:100vh!important;height:auto!important;overflow:initial!important;'>");
|
||||||
build.Append(html);
|
build.Append(html);
|
||||||
build.Append("</div></body>");
|
build.Append("</div></body>");
|
||||||
build.Append("</html>");
|
build.Append("</html>");
|
||||||
|
@ -129,11 +129,10 @@
|
|||||||
// Block: Setup a skip button.
|
// Block: Setup a skip button.
|
||||||
//
|
//
|
||||||
if (!document.body.hasAttribute("td-example-notification")){
|
if (!document.body.hasAttribute("td-example-notification")){
|
||||||
document.body.insertAdjacentHTML("afterbegin", `
|
document.body.children[0].insertAdjacentHTML("beforeend", `
|
||||||
<svg id="td-skip" width="10" height="17" viewBox="0 0 350 600">
|
<svg id="td-skip" width="10" height="17" viewBox="0 0 350 600">
|
||||||
<path fill="#888" d="M0,151.656l102.208-102.22l247.777,247.775L102.208,544.986L0,442.758l145.546-145.547">
|
<path fill="#888" d="M0,151.656l102.208-102.22l247.777,247.775L102.208,544.986L0,442.758l145.546-145.547">
|
||||||
</svg>
|
</svg>`);
|
||||||
`);
|
|
||||||
|
|
||||||
document.getElementById("td-skip").addEventListener("click", function(){
|
document.getElementById("td-skip").addEventListener("click", function(){
|
||||||
$TD.loadNextNotification();
|
$TD.loadNextNotification();
|
||||||
@ -150,4 +149,9 @@
|
|||||||
document.body.addEventListener("mouseleave", function(){
|
document.body.addEventListener("mouseleave", function(){
|
||||||
document.body.classList.remove("td-hover");
|
document.body.classList.remove("td-hover");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
//
|
||||||
|
// Block: Force a reset of scroll position on every load.
|
||||||
|
//
|
||||||
|
history.scrollRestoration = "manual";
|
||||||
})($TD, $TDX);
|
})($TD, $TDX);
|
||||||
|
@ -2,7 +2,9 @@
|
|||||||
/* General */
|
/* General */
|
||||||
/***********/
|
/***********/
|
||||||
|
|
||||||
body.td-notification {
|
html, body {
|
||||||
|
height: auto !important;
|
||||||
|
overflow-x: hidden !important;
|
||||||
overflow-y: auto !important;
|
overflow-y: auto !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -136,7 +138,7 @@ html[data-td-font='smallest'] .badge-verified:before {
|
|||||||
|
|
||||||
#td-skip {
|
#td-skip {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
left: 30px;
|
left: 29px;
|
||||||
bottom: 10px;
|
bottom: 10px;
|
||||||
z-index: 1000;
|
z-index: 1000;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
Loading…
Reference in New Issue
Block a user