Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name E-sim companies
- // @namespace http://history.unixstorm.org/staff/js/
- // @version 0.1
- // @description adds new column 'Worklog' with links to workers' working history
- // @author Michal
- // @include /^https?:\/\/(.*)\.e-sim\.org\/company.html?.*$/
- // @grant none
- // ==/UserScript==
- (function() {
- 'use strict';
- $(`table:last.dataTable`).width(400);
- $("<td>Worklog</td>").appendTo($(`table:last > tbody > tr.tableHeader`));
- $(`table:last > tbody > tr.tableRow`).each(function(){
- let $link = $(this.querySelector('td:nth-child(1) > a ')).attr('href');
- let id = /id=(\d*)/.exec($link)[1];
- $(`<td><a target="_blank" href=workResults.html?id=`+id+`>log</a>`).appendTo(this);
- });
- })();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement