Raw Source
xSh0uTx / KB Formater

// ==UserScript==
// @name         KB Formater
// @namespace    http://tampermonkey.net/
// @version      0.31
// @description  Obsolete version, please update
// @author       76561198102993358
// @match        https://qvcprod.service-now.com/kb_view.do?*
// @grant        none
// @copyright 2021, xSh0uTx (https://openuserjs.org/users/xSh0uTx)
// @license MIT
// @downloadURL https://openuserjs.org/install/xSh0uTx/KB_Formatter.user.js
// @updateURL https://openuserjs.org/meta/xSh0uTx/KB_Formatter.meta.js
// ==/UserScript==

//test 0.30


function User_Button(event) {
    let tempButton = $('myButton1');
    navigator.clipboard.writeText("https://qvcprod.service-now.com/itsp?id=kb_article&sys_id=" + document.querySelector("#articleId").value);
    tempButton.innerHTML = ' == Copied == ';
    setTimeout(function(){ tempButton.innerHTML= "Share with user"; }, 1000);
}

document.querySelector("#articleFooter > div").innerHTML += '<button id="myButton1" style="white-space: nowrap; float: right; margin-right:5%; margin-bottom:30px;" type="button" title="" data-original-title="Copy Permalink to External KB portal" aria-expanded="false">Share with user</button>';
document.querySelector("#myButton1").addEventListener ("click", User_Button , false);