servicenow-userscripts/bc3ffcbb66c7master
readme.md
ServiceNow Userscripts
August 9th, 2016 Laurent Indermühle
This is a collection of userscripts for ServiceNow. Their purpose is to extend ServiceNow's functionnalities or enhance the agent's quality of life
The userscripts are javascripts that are executed in the browser, usually when a specific page is displayed. Their names end in "user.js"
You have to install Greasemonkey, Tampermonkey, Scriptish or other similar addon to run those scripts.
Script: servicenow-toc.user.js
Runs when a knowledge article is edited. Add a button in the Wysiwyg editor (TinyMCE) "Create or update table of contents". When pressed, creates unique ids on titles contained in the text editor and then insert a table of content with anchor links.
The table of contents is either inserted inplace when it already exists or just above the first title except for the <h1> one.
Example :
Titre Level 1 Description lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Table of content <---- Titre level 2 <---- Titre level 2 <---- Titre level 3 <---- <---- Table of contents inserted above here Titre Level 2 Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim