Sunday, 28 July 2013

Displaying Amazon "iframe" Ads Without The Scroll Bar In Scribefire

As I have mentioned previously, a scroll bar will appear when I place an Amazon "iframe" ad in Scribefire Chrome for Opera, resulting in the ad not being displayed as it should while editing, and indeed after publishing, while in "Edit Visually" mode.

After having gathered enough courage to peek at Scribefire's source code, I am glad that I have found a fix to this problem (see Note 1 below on extracting the source code from the Scribefire Extension file "scribefire-4.oex").

This is what I did to remove the scroll bar. I appended additional parameters to line 964 in the file "events.js" - they are actually just parameters found in the code given by Amazon that were not defined in this line. Below is how the line looks before modification:

extended_valid_elements : "iframe[title|width|height|src|frameborder|allowfullscreen]",

My modified line now reads:

extended_valid_elements : "iframe[title|width|height|src|frameborder|allowfullscreen|style|scrolling|marginwidth|marginheight]",

And now the Amazon "iframe" ads is displayed as it should, without the scroll bar, while editing the post in Scribefire and also upon publishing to my blog while in "Edit Visually" mode.


Directory Structure And Files In "scribefire-4.oex"

  1. The Scribefire Chrome Extension for Opera "scribefire-4.oex" is actually a file in the ZIP file format. To extract the source code, just rename the file's extension from .OEX to .ZIP and use an archiving software like 7Zip to extract the source code.

    Once the modification has been made, just Zip the files back with 7Zip, or with any other archiving software. Do remember to preserve the file and directory structure in your, now modified, Zip file as in the original Scribefire Chrome Extension file "scribefire-4.oex".

    Rename the Zip file extension back to .OEX, and reinstall the extension.

  2. As I have made some, albeit, a minor change to Scribefire, I have also modified the version number parameter in the file " Config.XML" so that I can differentiate between the original Scribefire extension and my modified version. Below in Red are the changes that I have made to this file.

<?xml version="1.0" encoding="utf-8"?>
<widget xmlns="" id="" version="4.0.1">
<name short="ScribeFire">ScribeFire</name>
<description>An easy-to-use blog editor lets you post to all of your blogs. Modified by Chuah TC</description>
<author href=""></author>
<access origin="*" />
<icon src="skin/icon-48.png" />

This is how the information looks like in "Manage Extension" (Ctrl+Shift+E) :

Scribefire Extension Details As Viewed in "Manage Extension"


Post a Comment

Note: Comments without a valid Blogger/Google+/WordPress/LiveJournal/TypePad/AIM/OpenID profile may be ignored.

Related Posts Plugin for WordPress, Blogger...