UselessScript#1

Change some words to fruits because why not

Από την 05/11/2014. Δείτε την τελευταία έκδοση.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey, το Greasemonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Userscripts για να εγκαταστήσετε αυτόν τον κώδικα.

You will need to install an extension such as Tampermonkey to install this script.

Θα χρειαστεί να εγκαταστήσετε μια επέκταση διαχείρισης κώδικα χρήστη για να εγκαταστήσετε αυτόν τον κώδικα.

(Έχω ήδη έναν διαχειριστή κώδικα χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Έχω ήδη έναν διαχειριστή στυλ χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

// ==UserScript==
// @name        UselessScript#1
// @namespace   www.google.com
// @description Change some words to fruits because why not
// @include    http://rateyourmusic.com/boards*
// @include    http://rateyourmusic.com/board_message*
// @include    https://rateyourmusic.com/boards*
// @include    https://rateyourmusic.com/board_message*
// @require    http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js 
// @version     1
// @grant       none
// ==/UserScript==			
// WARNING: EXTREMELY BUGGY! UTMOST CAUTION REQUIRED!
$('.mbgen td').each(function() {
  var cellText = $(this).html();
	var mapObj = {
//If you want to add words, just put it inside here in this format <word you want replaced>:"<word replacement>"
//ex: objective:"mango" 
//Oh yeah, don't forget to add a comma unless it's the last line(hope you got that)   
		objective:"mango",
		subjective:"pineapple"
	};
	
	cellText = cellText.replace(/objective|subjective/gi, function(matched){
		return mapObj[matched];
	});
	
	$(this).html(cellText);
});