drummerhead / css-inject Goto Github PK
View Code? Open in Web Editor NEWCSS focused Bookmarklet generator. Modify the layout and looks of a site on the fly.
Home Page: http://mcdlr.com/css-inject/
License: Other
CSS focused Bookmarklet generator. Modify the layout and looks of a site on the fly.
Home Page: http://mcdlr.com/css-inject/
License: Other
It changes:
background-image: url("data:image/svg+xml; SVG CODE HERE");
to:
background-image: url("data:image/svg+xml!important; SVG CODE HERE")!important;
This means it doesn't work
Love the tool, but I forgot to save my original CSS. Now it's mangled into escape codes and !importants and hard to get back from the bookmarklet.
Just a "nice to have" suggestion if youre ever bored
thanks again for the tool
Input CSS
#advertisement-container {
display: none !important;
}
Output JS
javascript:(function(){ var style = document.createElement(%27style%27), styleContent = document.createTextNode(%27#advertisement-container { display: none !important !important; }%27); style.appendChild(styleContent ); var caput = document.getElementsByTagName(%27head%27); caput[0].appendChild(style); })();
Url decoded and formatted:
javascript: (function() {
var style = document.createElement('style'),
styleContent = document.createTextNode('#advertisement-container { display: none !important !important; }');
style.appendChild(styleContent);
var caput = document.getElementsByTagName('head');
caput[0].appendChild(style);
})();
If anyone, like me, is wondering why their bookmarklets are broken, it's an easy workaround to just remove all of my !important tags. Since this injector adds more of them to everything even if they're already there, try removing your important tags first. Yeah.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.