Skip to content

Instantly share code, notes, and snippets.

View mysliwiec-tech's full-sized avatar

Dariusz Myśliwiec mysliwiec-tech

  • Kraków, Poland
View GitHub Profile
@mysliwiec-tech
mysliwiec-tech / ecc.js
Created February 11, 2020 09:24
Helper for ServiceNow Workflows. It moves you to a specified place in the ECC queue when you click on the activity that is doing REST call. It takes the Start Date and End date from the activity. When executed Workflow is being shown, paste the script into browser console and hit <Enter>. Then hold <Ctrl> and do left click to have the ECC tab op…
document.on('click', event => {
if(event.ctrlKey) {
var text = document.querySelector('div .popover').innerText
var started, ended;
started = text.match(/Started: (\d{2})-(\d{2})-(\d{4}) (\d{2}):(\d{2}):(\d{2})/);
started = generateDate(started);
ended = text.match(/Ended: (\d{2})-(\d{2})-(\d{4}) (\d{2}):(\d{2}):(\d{2})/);
ended = generateDate(ended);
window.open(generateUrl(started, ended), '_blank');

Keybase proof

I hereby claim:

To claim this, I am signing this object:

Keybase proof

I hereby claim:

To claim this, I am signing this object: