Advertisement
jraavis

ADL JobMaster Hover Edit

Nov 22nd, 2018
165
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // ==UserScript==
  2. // @name         Job Master
  3. // @namespace    http://tampermonkey.net/
  4. // @version      0.1
  5. // @description  try to take over the world!
  6. // @author       You
  7. // @match        http://jobstatus.adlightning.com.s3-website-us-east-1.amazonaws.com/
  8. // @require http://code.jquery.com/jquery-3.3.1.min.js
  9. // @grant        none
  10. // ==/UserScript==
  11.  
  12. (function() {
  13.     'use strict';
  14.     $(document).ready(function() {
  15.         $("body").on("click","tr.md-row td.md-cell",function() {
  16.             /*
  17.             var text = $(this).find('input').val()?$(this).find('input').val():$(this).text();
  18.             var input = $('<input />', { type: 'text', readonly: 'readonly', class: 'md-input md-select-value', value: text, on:{ select: function(){ this.select(); }, blur: function(){ $(this).parent().html(this.value); }, copy: function(){ $('.md-errors-spacer').text($(this).val()+' copied').css('color','#0a0'); } }});
  19.             $(this).attr('data-inject',text);
  20.             $(this).html(input);
  21.             $(this).find('input').select();
  22.             */
  23.             var tab = '<table cellpadding="5" cellspacing="0" style="border:1px #ddd solid;font-size:13px;">';
  24.             $('.md-dialog-content b.ng-binding').each(function(index){
  25.                 $(this).parentsUntil(".layout-column").each(function(){
  26.                     if($(this).parent().find('h4').eq(0).text()=='WhoIs Data'){ tab+='<tr><td colspan="2" style="text-align:center;"><b>Whois Data</b><td></tr>'; $(this).parent().find('h4').eq(0).remove(); $(this).remove(); }
  27.                 });
  28.                 tab+='<tr><td><b style="text-transform:capitalize;">'+$(this).text().replace('_',' ')+'</b></td>';
  29.                 var parent = $(this).parent();
  30.                 var child_link = $('a',parent).attr('href');
  31.                 var div_s = '<div onselect="(function(){document.execCommand(\'copy\',false,null);})();" style="-webkit-user-select: all;user-select: all;border-top:0px;width:100%;">';
  32.                 var text = '';
  33.                 if(typeof child_link!='undefined' && child_link!=''){
  34.                     var border_bottom = "border-bottom:0px!important;";
  35.                     var main_value = $(this).parent().text().replace($(this).text(),'');
  36.                     text = '<a href="'+child_link+'" style="font-size:10px;">'+main_value+'</a>';
  37.                     text+= '</div></td></tr><tr><td></td><td style="border:1px solid #ddd;border-top:0px;">'+div_s+child_link+'</div></td></tr>';
  38.                 } else {
  39.                     text = $(this).parent().text().replace($(this).text(),'');
  40.                 }
  41.                 tab+='<td style="-webkit-user-select: all;user-select: all;border:1px solid #ddd;'+border_bottom+'" onmouseover="this.click()">'+div_s+text+'</div></td></tr>';
  42.                 if(index!=0){ $(this).parent().remove(); }else{ $(this).replaceWith('<div class="raavitab"></div>'); }
  43.             });
  44.             tab += '</table>';
  45.  
  46.             $('.raavitab').html(tab);
  47.  
  48.             $('md-dialog-content div.layout-align-center-center').css({'position':'absolute','top':'60px','left':'0px','z-index':'999','width':'100%','background':'white'});
  49.             $('div.layout-align-center-center .md-button').css({'background':'#008FFB','color':'#fff'});
  50.             $('div.layout-column.flex-50 textarea').attr('rows','10');
  51.             if($('div.layout-column.flex-50 textarea').html()==''){$('div.layout-column.flex-50 textarea').html('Findings:'+"\n\n\n"+'Investigation Report:'+"\n");}
  52.         }).on("mouseout","tr.md-row td:first-child .md-cell",function(){
  53.             /*$(this).html($(this).attr('data-inject'));*/
  54.         });
  55.         function callRemover() {
  56.  
  57.         }
  58.     });
  59.     // Your code here...
  60. })();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement