Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name MMA Tycoon Show Weekday on fight offers.
- // @namespace http://www.tycoontools.com/greasemonkey-scripts
- // @description This script adds weekday to fight offers date.
- // @include http://www.mmatycoon.com/fightoffers.php*
- // @include http://mmatycoon.com/fightoffers.php*
- // @version 1.0
- // @copyright 2018
- // @require http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.js
- // ==/UserScript==
- function Main() {
- var weekday = ["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"];
- jQuery("table table table table > tbody > tr:not(:first-child) > td:nth-child(6)").each(function() {
- var currentDate = jQuery(this).clone().children().remove().end().text();
- currentDate = $.trim(currentDate);
- var date = new Date(currentDate);
- var dayOfWeek = weekday[date.getDay()]
- jQuery(this).prepend(dayOfWeek+'<br>');
- });
- }
- Main();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement