Repository navigation
Replies: 6 comments 34 replies
|
Use
|
It's invalid, such syntax is described nowhere in the documentation. What you are asking is not possible. |
|
Yeah, I figured this might not be possible with the current capability set. For now I converted that rule to one that just loads a custom scriptlet which then detects if in main frame and if so injects the CSS. I'll try these other solutions mentioned, I'm curious to just see if any would work. |
Doesn't work. Keeps PTR disabled, but still doesn't allow page scrolling.
Also doesn't work. Same result - PTR remains disabled but still no page scrolling. This is an interesting syntax though, For now I guess I'll be sticking with my custom scriptlet. Thanks. |
|
For reference, here's the scriptlet I'm using to achieve my desired goal. Maybe someone will find it useful. /// no-ptr.js
(function() {
'use strict';
if (self !== top) {
return;
}
const CSS = `
:is(:root, HTML, BODY) {
overscroll-behavior-y: contain !important;
}
`;
const doc = self.document;
const a = 'adoptedStyleSheets';
if (a in doc) {
const s = new CSSStyleSheet();
s.replaceSync(CSS);
try {
doc[a].push(s);
}
catch (err) {
doc[a] = [ ...(doc[a] || []), s ];
}
} else {
const s = doc.createElement('STYLE');
s.setAttribute('type', 'text/css');
s.appendChild(doc.createTextNode(CSS));
doc.head.appendChild(s);
}
})();*##+js(no-ptr)Of course, you have to point uBo to the scriptlet using the |
|
Theoretically, Stylus has the option to reveal whether a frame is embedded: https://github.com/openstyles/stylus/wiki/Options#expose-iframes-via-htmlstylus-iframe *##:root:not([stylus-iframe]), :root:not([stylus-iframe]) BODY { overscroll-behavior-y: contain !important; }This could be converted to another scriptlet variant to avoid relying on adopted stylesheets. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Description
I have this rule:
It is meant to disable the annoying pull-to-refresh. It works really well in most cases. However, on pages that consist mostly of a full-height (non-scrollable)
IFRAME, the scroll gesture gets "captured" by theIFRAME(since it takes up most of the page surface) and the page itself won't scroll.(I'm talking mostly of mobile experience since that is my primary at this point.)
Is there a way to limit such a cosmetic filter to the main frame only?
I tried this:
But that is of course not valid syntax.
Steps to Reproduce
All reactions