Bookmark-file-128 (1)

MangaFox fullscreen Minimalist module

0

Here’s another one of the modules I have written for Minimalist for Everything, a Chrome extension that lets you alter the appearance of web pages.

While I am not an otaku I am an avid manga fan. I have a sizeable paperback manga collection. Many manga, however, are pretty difficult to come by, either because of their age or their rarity, or are simply not yet published in some countries. MangaFox is one of the largest communities of scanlators around, and its a great resource for those who enjoy reading manga.

The user interface, though, is pretty badly designed and very cluttered. If you don’t have a big screen or if you are trying to read the manga on a laptop you will need to keep scrolling down every time you change page. It gets annoying pretty quickly.

This module will allow you to read all the manga available on MangaFox in fullscreen while removing all the clutter that surrounds the images. It will maximise the height of the images and remove the navigation bar as well but you can use the more convenient arrow keys to move between pages. It will also not activate on the home page, so you can still use the Search feature.

MangaFox Minimalist module

Create a new Module, then click on Edit and put the following string into the @includes field:

*mangafox.me/manga/*

Then click on Add Option and put the following code in the CSS field:

The only part you have to change is the height value on row 4, put whatever the height of your screen is in pixels (768 is the height of the MacBook Air 11″). Save Changes and from now on you can enjoy reading your favourite manga in fullscreen on MangaFox.

No hassle.

code-watch-icon1

myBarclays LogIn Minimalist module

0

Today I want to share one of the modules I have written for Minimalist for Everything, a Chrome extension that lets you alter the appearance of web pages. This module fixes what I regard as a minor, yet very important flaw in the UX design of the myBarclays LogIn page. The login process is based on two separate pages.

The first one requires you to provide information related to your account (either your last name, your card number or your sort code and account number), but you can choose to store this information for convenience. It’s not great practice but at the end of the day that stuff is not secret anyway, and it’s not what the security is based upon. The second page asks for the last 4 digits of your card number, plus the two login codes generated by the PINsentry device.

myBarclays LogIn p1 myBarclays LogIn p2

Well, call me anal (please) but if there’s one thing I absolutely hate when browsing is unjustified mouse clicks. The way I see it, 99.999% of the time there’s only one reason why I’m on that page, and it’s to login to my account. Therefore the input focus should be automatically set on the Next button on the first page and on the input field for the second. Why that’s not the case is beyond my comprehension, but I have written this Minimalist for Everything Module specifically to fix this issue.

Create a new Module, then click on Edit and put the following string into the @includes field:

*bank.barclays.co.uk*

Then click on Add Option and put the following code in the Head JS field:

Save Changes and from now on you will never need another mouse click during the myBarclays LogIn process.

Enjoy!

Bookmark-file-128 (1)

Chrome App – Minimalist for Everything

0

Minimalist for Everything is an extension for the Chrome web browser that allows you to run your own CSS and Javascript on third party web pages.

It’s similar to the famous Firefox add-on Greasemonkey and its less known Chrome alternative Tampermonkey. The main difference is that Tampermonkey is heavily Javascript based, so if you want to include a CSS you must write it within the Javascript code.

Minimalist on the other hand, while less powerful and less flexible, lets you write the CSS and Javascript separately. For each website you can create any number of Modules based on domains (you can use wildcards) and within each Module you can create a number of Options which are sets of CSS and JS.

The extension does require full access to the browser activity but that’s understandable as it need to alter the rendering of the websites. The code is open and available on GitHub, so no real worries for security.

There are a couple of limitations that make Minimalist not as good as it could be. One is that you can only add Javascript to the HEAD of a page, but not the BODY. Also, while you can theoretically sync the settings and modules across computers the feature is a little buggy at the moment and it doesn’t always run properly.

Apart from that it is a great extension and I use it constantly to fix bugs, minor glitches and major design flaws. I will from time to time post some of the Modules I devised to improve my browsing experience.

Stay tuned.

code-watch-icon1

Fix WordPress Gantry Framework migration issues

0

If you have ever tried to migrate a WordPress website whose theme is based on the Gantry Framework you have probably run into a major problem. The usual approach of manually changing the siteurl and home fields in the options table of the database doesn’t work.

The reason is that the Gantry Framework uses data serialization to store its settings, among which are many instances of the website’s domain. Therefore we need a way to de-serialize this data, replace the necessary strings and then re-serialize it and put it back into the database.

Fortunately there is a tool that does just that: Database Search and Replace by interconnect/it

You can either download the script or use the tool directly from the website and it’s free. Version 3 is in beta at the moment but it’s interface is much more polished and it lets you select which tables you want to work on and do simulations before you actually affect the database.

IMPORTANT: remember to disable any cache plugins you might have installed on your WordPress, otherwise you’ll encounter a bunch of errors.

code-watch-icon1

MySQL – Find and delete orphan records

0

Some time ago I had to deal with a MySQL database that had been migrated to a server that didn’t have support for InnoDB tables. Consequently, all the foreign keys and policies had been lost. Fortunately, they were all ON DELETE policies. The client, though, had kept using the database as usual, so he ended up with a bunch of orphan records in the children tables that were supposed to be deleted along with they respective parent records.

Here’s a simple procedure to clean up the database. In PhpMyAdmin or from within your script, use the following query to identify the orphan records.

SELECT * FROM children WHERE parent_id NOT IN (SELECT id FROM parents);

You can check the list to be 100% sure it only contains orphan records, then you can use the following query to delete them.

DELETE FROM children WHERE parent_id NOT IN (SELECT id FROM parents);

Piece of cake.

Go to Top