Wednesday, January 18, 2012

Auto-Translate chrome extension or why did I create the plugin?!

Hi there!

This is my first plugin, so if you find any problems please send me a reply with a prob description.

The beginning of plugin history.
One day I found strange pics and html constructions at the foot of my posts (I read them in google-reader). It was found that Auto-Translate plugin for Chrome inserts code into Visual TinyMCE editor (that is used in Wordpress) that can be found only if you switch to HTML view. Something like this:

<div id="-chrome-auto-translate-plugin-dialog" style="display: none; opacity: 1 !important; border-color: none !important; background: transparent !important; padding: 0 !important; margin: 0 !important; position: absolute !important; top: 0; left: 0; overflow: visible !important; z-index: 999999 !important; text-align: left !important;">
<div style="max-width: 300px !important; color: #fafafa !important; opacity: 0.8 !important; border-color: #000000 !important; border-width: 0px !important; -webkit-border-radius: 10px !important; background-color: #363636 !important; font-size: 16px !important; padding: 8px !important; overflow: visible !important; background-image: -webkit-gradient(linear, left top, right bottom, color-stop(0%, #000), color-stop(50%, #363636), color-stop(100%, #000)); z-index: 999999 !important; text-align: left !important;"></div>
<img style="position: absolute !important; z-index: -1 !important; right: 1px !important; top: -20px !important; cursor: pointer !important; -webkit-border-radius: 20px; background-color: rgba(200, 200, 200, 0.3) !important; padding: 3px 5px 0 !important; margin: 0 !important;" onclick="document.location.href='';" src="" alt="" /></div>

At first I tried to find suitable plugin that can fix the problem. Actually the plugin has to remove any specified html (using regexp of course, because how else can you specify such a big piece of html?) from the post. But I didn't find any. That was the initial kick to start developing a new one.

And now I'm going to release the very-first version of HTML Regex Replace plugin that can be used not only to remove annoying chrome-auto-translate-plugin-dialog HTML, but for any automatic replacement you want. And with the power of regular expressions!

I'm waiting for plugin review by team and ASAP will release it to the public.

No comments:

Post a Comment