You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: script.js
+1-1
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ new MutationObserver(mutations => {
6
6
if(!node.parentNode)return// Skip if no parent.
7
7
varscope='self__'+(window.cssScopeCount++)// Ready. Make unique scope, example: .self__1234
8
8
node.parentNode.classList.add(scope)
9
-
node.textContent=node.textContent.replace(/\.(me|this|self)(?![a-zA-Z])/g,'.'+scope)// Can use: .me .this .self
9
+
node.textContent=node.textContent.replace(/(^|\.|(?<=\s|[^a-zA-Z0-9\-\_]))(me|this|self)(?![a-zA-Z])/g,'.'+scope)// Can use: me this self
10
10
node.cssScopeInlineDone=1
11
11
// Optional. Responsive design. Mobile First (above breakpoint): 🟢 None sm md lg xl xx 🏁 Desktop First (below breakpoint): 🏁 xs- sm- md- lg- xl- None 🟢
12
12
node.textContent=node.textContent.replace(/(?:@media)\s(xs-|sm-|md-|lg-|xl-|sm|md|lg|xl|xx)/g,// *- matches must be first!
0 commit comments