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 https://code.jquery.com/jquery-3.3.1.min.js
- // ==/UserScript==
- jQuery(document).ready(function() {
- var weekday = ["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];
- 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>');
- });
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement