Discussions » Demandes de création de scripts
PunBB ignore user.
// ==UserScript==
// @name Filter people on a punBB board
// @description Filters people on a punBB board
// @author Jixun
// @version 1.0
// @namespace org.jixun.hide.punbb.user
// @include http://board.url.here/*
// @run-at document-start
// @license MIT License
// ==/UserScript==
var listOfUsers = ['Admin', 'somebody'];
addEventListener ('DOMContentLoaded', function () {
[].forEach.call (document.querySelectorAll ('.main-topic > .post'), function (post) {
var user = post.querySelector('.post-byline > em > a, .post-byline > strong').textContent;
if (listOfUsers.indexOf (user) != -1) {
post.style.display = 'none';
}
});
}, false);
Then just fill in the @include
and listOfUsers
and that's done :3
Thanks but it doesn't seems to work.
I tried the script in Firefox (regular Greasemonkey) and Safari (Javascript Blocker with greasemonkey features), with the user's nickname and his id (it's a number). No change.
Here's one post of the guy, it might help : http://pastebin.com/e5WZTi8t
// ==UserScript== // @name Filter people on a punBB board // @description Filters people on a punBB board // @author Jixun // @version 1.0 // @namespace org.jixun.hide.punbb.user // @include http://board.url.here/* // @run-at document-start // @license MIT License // ==/UserScript== var listOfUsers = ['Someone']; addEventListener ('DOMContentLoaded', function () { [].forEach.call (document.querySelectorAll ('#punviewtopic td > .blockpost'), function (post) { var user = post.querySelector('.postleft a').textContent; if (listOfUsers.indexOf (user) != -1) { post.style.display = 'none'; } }); }, false);
Fixed version.
It doesn't work with Javascript Blocker but it work with Ninjakit. Damn Safari7...
Thank you ! =)
It doesn't work with Javascript Blocker but it work with Ninjakit. Damn Safari7...
Thank you ! =)
You're welcome :3
PunBB ignore user.
Hi.
It seems there's no functional script to ignore user on Punbb's boards.
Is it possible to make a simple script to do this ? No fancy options, just a line to fill with id's user. =)
I'm so annoyed by some users on a few boards, I'm considering learning javascript if no one can do that haha. To make a functional script in Javascript Blocker (http://javascript-blocker.toggleable.com Its an OSX safari's extension compatible with greasemonkey's scripts) or a WHOLE safari's extension...
Sorry for my bad english and thanks in advance for your time and attention.