less.js
less.js copied to clipboard
Fix for Browser InjectJS when no html.head especially in TamperMonkey and ViolentMonkey
What: Runtime at browser. fix for less.js is inject into browser by TamperMonkey or ViolentMonkey, but there is no head tag or even html tag.
Why: without head tag, less.js won't work proplywork properly. it will throw a error TypeError: head is undefined
Checklist:
- [ ] Documentation N/A
- [ ] Added/updated unit tests N/A - all test good, and no need for special test
- [x] Code complete
PR Reason for: when ViolentMonkey xx.user.js use less.js as a library, they will inject the script to chrome content, at that time webpage head tag or even html tag doesn't exist, and then error happed, then all xxx.user.js won't work.