-
Notifications
You must be signed in to change notification settings - Fork 0
/
controller.user.js
28 lines (28 loc) · 1.23 KB
/
controller.user.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
// ==UserScript==
// @name Korben.info Publicity Article Controller
// @namespace com.github.vdubus.greasemonkey.userscript
// @description Alert the user about articles containing publicity on Korben.info website
// @include http://korben.info/*
// @version 2
// @grant none
// @downloadURL https://cdn.rawgit.com/vdubus/gm-korben-pub-controller/master/controller.user.js
// @updateURL https://cdn.rawgit.com/vdubus/gm-korben-pub-controller/master/controller.user.js
// @require https://ajax.googleapis.com/ajax/libs/jquery/2.2.2/jquery.min.js
// @require https://cdn.rawgit.com/jonnyreeves/js-logger/master/src/logger.js
// ==/UserScript==
var jQuery2 = jQuery.noConflict(true);
(function ($) {
function initialization() {
Logger.useDefaults();
var publicities = $('.post-date>p:contains(\'Publicité\')').closest('div[id^=\'post-\']').add("div.wesh");
publicities.css({
'background-color' : '#FFBBBB',
'border-style' : 'solid',
'border-color' : 'red'
});
var title = publicities.find('h2.post-title>a');
title.text('[Publicity] ' + title.text());
Logger.info('Found %d publicity(ies) article(s)', publicities.length);
}
$(document).ready(initialization);
}) (jQuery2);