Help Need regexp for Quora.com (for namespace regexp'"XXX")
You can easily do that with JS. (That will be faster than regular expressions)
(function() {
if(location.host === 'boards.greenhouse.io' || location.host.indexOf('quora.com') > -1) {
let css = `
/* Your CSS Code */
`
let style = document.createElement('style')
style.appendChild(document.createTextNode(css))
document.querySelector('head').appendChild('style')
}
})()
Nice, but i need for my userstyle too..
And the install as userscript of Greasyfork convert it after.
Just for curiosity:
Why "location.host === 'boards.greenhouse.io'" ?
Thank!
Regexp are not my taste of tea ....
From:
https://forum.userstyles.org/discussion/52343/how-to-use-the-regexp
Regexp rules should be a valid regular expression which will be tested against the entire URL.
- Regexps must be enclosed in quotes.
- Backslashes "/"must be escaped according to CSS rules.
- Regexp wildcards are permitted.
Your good rexp in regex101 Online Tool (https://regex101.com/r/ZKnDnR/1), is:
/^https:\/\/(?!quora.com*)\S+\/*/gm
I test (after Backslashes "/" escaped):
@-moz-document domain("www.quora.com"), url-prefix("https://quora.com"), regexp('^https:\\/\\/(?!quora.com*)\\S+\\/*')
And YES, that's GOOD!
Thanks a lot.
I hope it match all these different url i found in future...
Note :
I don't understand the logic of Quora:
- Many different url
- Its design is strange (too wide image by example)
And at least without login:
- Nag screen with blurry contents
- No search:
but i made an Ready2Search(Quora in site search DukDukGo) for it.
But their are some interesting things in it...
Problem:
I notice the script (v.4) and its userstyle version are applied to all sites...
A regexp problem ?
tophf found the good and simple solution:
RegEx Help #1476
I need just:
@-moz-document domain(quora.com)
Simply....
For my userscript /CSS:
Quora.com Without Limit
I need a regexp which match too pages like that (where quora.com is not at beginning of the URL):
https://questionsmilitaires.quora.com/?share=1
https://quorafr.quora.com/
I make a test but it's not working :
regexp("/(quora.com)")