Comments (2)
the parser is from https://github.com/jarek-foksa/xel/blob/b68391d2787c76ec574948d649ab6e77ecb554d9/utils/template.js, including all elements: https://github.com/jarek-foksa/xel/blob/master/elements/x-tag.js
so it doesn't make too much sense to develop some sophisticated guessing and prettifying when the source code is available
another issue is that modifying the spaces and newlines can affect the formatting (e.g. in a <pre>
element)
if you still wanna do it, I suggest renaming the functions to html
and css
, then letting prettier handle it: playground
from webcrack.
renaming the functions to
html
andcss
thanks! : )
#!/usr/bin/env bash
s=""
mangled_html="un"
mangled_css="xn"
# rename tagged template literals to html`...` and css`...`
# so prettier can prettify the string contents
# \b = word boundary
s+='s/\b'$mangled_html'`/html`/g;'
s+='s/\b'$mangled_css'`/css`/g;'
# rename the tag functions to html and css
s+='s/let '$mangled_html' =/let html =/g;'
s+='s/let '$mangled_css' =/let css =/g;'
# replace html`${'str'}` with html`str`
# \b = word boundary
s+="s/\bhtml\`\\\$\{'([^'\`]*)'\}\`;/html\`\1\`;/g;"
sed -i -E "$s" elements/apps/bx-progressivewebapp.js
prettier -w \
elements/apps/bx-progressivewebapp.js \
from webcrack.
Related Issues (20)
- Unknown Obfuscation Type HOT 1
- Mangle Variables Doesn't work but when uncheck it deobfuscates HOT 1
- *lint menu* can have multiple dropped down HOT 2
- broken tab style HOT 1
- Web IDE 'File -> Save'/etc menu items suggest the wrong keybindings on macOS HOT 3
- Web IDE 'File -> Open Recent' menu item should show a chevron/other indication that it's a sub-menu
- Web IDE 'File -> Open Recent' doesn't actually seem to restore the chosen item HOT 1
- Allow recent items to be individually removed from the Web IDE 'File -> Open Recent' menu HOT 2
- Error when deobfuscating some files HOT 2
- this type of bundled code cannot be unbundled HOT 1
- FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory HOT 2
- Segmentation fault on arm64 HOT 4
- Cannot decode Javascript-obfuscator 4.1.1 HOT 6
- renaming variables
- Issue with multiple assignments HOT 1
- Error when deobfuscating some files HOT 1
- cannot deobfuscate HOT 1
- Error when deobfuscating some files HOT 1
- __Deadcode_0__ HOT 1
- Multiple bundles HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from webcrack.