Skip to content

Instantly share code, notes, and snippets.

@evopix
Last active September 24, 2015 17:47
Show Gist options
  • Save evopix/785284 to your computer and use it in GitHub Desktop.
Save evopix/785284 to your computer and use it in GitHub Desktop.
Removing jQuery dependency and updating to work with Scriptish.
// ==UserScript==
// @id forum.kohanaframework.org-d0515b72-1b32-4b30-a2e6-ab4f0f3fbb13@evopix
// @name KohanaForumHideRussian
// @version 2.0
// @namespace evopix
// @author Brandon Summers
// @description Hide Russian threads from Kohana forum.
// @include *forum.kohanaframework.*
// @run-at document-end
// ==/UserScript==
function main() {
var items = document.querySelectorAll('ul.DataList li.Item');
for (var i = 0, len = items.length; i < len; i++) {
var elem = items[i],
category = elem.querySelectorAll('div.Meta a.Category')[0].innerHTML;
if (category == 'Русскоязычное сообщество') {
elem.style.display = 'none';
}
}
}
main();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment