Created
March 21, 2017 06:20
-
-
Save wulab/54b16891cdd693a6563f6041ac88ddd5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ==UserScript== | |
| // @name mac2hand | |
| // @namespace wulab | |
| // @include http://www.mac2hand.com/* | |
| // @version 1 | |
| // @grant none | |
| // ==/UserScript== | |
| var merchants = [ | |
| 'Asree.BKKApple', | |
| 'Cherie', | |
| 'JQcomputer', | |
| 'KRIch', | |
| 'MacBKK', | |
| 'hometown', | |
| 'ipad.alohas', | |
| 'kit.id2', | |
| 'mac2hand', | |
| 'maccafethai', | |
| 'Mahacom', | |
| 'manocha.piyachart', | |
| 'mr.kok', | |
| 'oOkritt', | |
| 'suttisirikul', | |
| 'tipmachome53' | |
| ]; | |
| var productList = $('#productList').detach(); | |
| $('#contentContainer').empty().append(productList); | |
| var blacklist = new RegExp(merchants.join('|')); | |
| $('.productContainer').each(function () { | |
| var container = $(this); | |
| if (container.is('.commercial')) container.remove(); | |
| if (blacklist.test(container.find('.poster').text())) container.remove(); | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment