olivierdagenais / tampermonkey-copy-url

A Tampermonkey userscript to copy nice-looking URLs to the clipboard.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ServiceNow support is broken since service provider "upgraded"

olivierdagenais opened this issue · comments

We were looking for /esc/?id= in the URL but that's not always the case.

It looks like the first div under body will have a class of sp-page-root:

<body class="firefox ng-scope fixed-header fixed-footer" accessibility="false">
  <div class="sp-page-root page flex-column sp-can-animate" style="">

The body also contains numerous now-message elements that have key and value attributes.

The URL title/text can be assembled from elements with classes ticket-number and ticket-desc:

    <h2 class="ticket-number ng-binding">TCKT000042</h2>
    <p class="ticket-desc ng-binding">Special request, might be title, might be something else.</p>

Released as v2.9.0