Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name Scootaloo is special
- // @namespace erin
- // @description pinkify scoots
- // @include *//8ch.net/animus/*
- // @version 1
- // @grant none
- // @run-at document-end
- // ==/UserScript==
- function pinkScoot(){
- var d, db, $, $$;
- d = document;
- db = document.body;
- $ = function(s, p){
- if(!p || p == null){
- p = db;
- }
- return p.querySelector(s);
- };
- $$ = function(s, p){
- if(!p || p == null){
- p = db;
- }
- return p.querySelectorAll(s);
- };
- $.each = function(a, c, e){
- for(var i = 0; i < a.length; i++){
- c(a[i], i);
- if(i == (a.length)-1){
- if(e && e != null){
- return e(a[i], i);
- }else{
- return a;
- }
- }
- }
- };
- $.time = function(t, c, l){
- if(c == false){
- return clearInterval(t);
- }else{
- if(l == true){
- return setInterval(function(){
- c();
- },t);
- }else{
- return setTimeout(function(){
- c();
- },t);
- }
- }
- };
- function makePink(){
- $.each($$('.reply'), function(post, xi){
- if($('.trip', post)){
- if($('.trip', post).innerHTML == '!DScooTaloo'){
- $('.trip', post).style.color = '#ff0bc3';
- $('.name', post).style.color = '#ff0bc3';
- }
- }
- });
- }
- makePink();
- $.time(1500, function(){ makePink(); }, false);
- d.addEventListener('8chan-Z.NewPosts', function(){ makePink(); $.time(1500, function(){ makePink(); }, false); }, false);
- d.addEventListener('threadUpdate', function(){ makePink(); $.time(1500, function(){ makePink(); }, false); }, false);
- d.addEventListener('new_post', function(){ makePink(); $.time(1500, function(){ makePink(); }, false); }, false);
- }
- pinkScoot();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement