# TelcoBridges Magic Bookmark

## What is a Bookmarklet?

A Bookmarklet is Javascript code that is saved in a browser as a bookmark, allowing a user to execute it on demand to dynamically modify a webpage.

We use this as a tool to provide additional ergonomic features to our users within the WebGUI.

For more information reference: <https://en.wikipedia.org/wiki/Bookmarklet>

## What can the Magic Bookmark do?

Current Features:

* Add Auto-Refresh to WebGUI's Call-Trace page
* Export configurations and statistics as a human readable .json file
* Mass edit H.248 Fixed Termination IDs (TMG Only)
* Mass add CAS Lines to a GR-303 Group (TMG Only)

## How do I install the MB?

Installing a bookmarklet is no different than adding a bookmark to your browser, generally achieved by right-clicking on your bookmark bar and clicking "Add a Bookmark".

The Name, Tags, and Keyword fields are cosmetic for your own organizational structure and can be set to anything you prefer.

In the URL Field copy the code below exactly:

```javascript
javascript: (function() {
    var _tbmb_script = document.createElement('script');
    _tbmb_script.src = 'https://tbsupport.s3.ca-central-1.amazonaws.com/magic_bookmark/current.js';
    document.head.appendChild(_tbmb_script);
    console.log('AWS: bookmark over');
})();
```

<figure><img src="https://3811773442-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiK3TemJSDhHz3xNMOvvk%2Fuploads%2FS62czC61kjJpSDcrMwpH%2Fimage.png?alt=media&#x26;token=82292485-b7cd-4b06-999c-2ddc9e8f5b50" alt=""><figcaption></figcaption></figure>

The code being executed when this button is clicked can be viewed at the[ script.src URL](https://tbsupport.s3.ca-central-1.amazonaws.com/magic_bookmark/current.js).

## How do I use the MB?

To use the Magic Bookmark log in to the ProSBC or TMG WebGUI and click the bookmark.&#x20;

The behavior of the bookmark will change depending on which page of the WebGUI you are on.

### Call-Trace

* Call Trace Page: MB will add an Auto-Refresh option<br>

  <figure><img src="https://3811773442-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiK3TemJSDhHz3xNMOvvk%2Fuploads%2FIhNWfQ2pOH5g3idH3pph%2Fimage.png?alt=media&#x26;token=1168604e-39fc-49d7-bd2b-edb41a270346" alt=""><figcaption></figcaption></figure>

### H.248

* H.248 Page (TMG Only): MB will add an editable field for all fixed termination IDs and a submit button<br>

  <figure><img src="https://3811773442-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiK3TemJSDhHz3xNMOvvk%2Fuploads%2FGvdq1iN4kRtHJeNmI83b%2Fimage.png?alt=media&#x26;token=7328c885-1f0f-4af2-838a-64cec30922b4" alt=""><figcaption></figcaption></figure>

### GR-303

* Inside a GR-303 Group: MB Will ask you how many lines you'd like to add (Up to 28).
  * Once selected the system will grab the lowest CAS stacks and create a name based on the Group Name.
  * Line Services, Line Numbers, and Names can be edited before Submitting New Lines

<figure><img src="https://3811773442-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiK3TemJSDhHz3xNMOvvk%2Fuploads%2FzXi5nu8bIIMJqXCUCejb%2Fimage.png?alt=media&#x26;token=59a733b4-8dc7-475b-89b2-56dd3e2fad33" alt=""><figcaption></figcaption></figure>

<figure><img src="https://3811773442-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiK3TemJSDhHz3xNMOvvk%2Fuploads%2FQsbQvuCrYqrZ4YKb3ouA%2Fimage.png?alt=media&#x26;token=56203c80-e345-41e3-84bd-20e3ebd43389" alt=""><figcaption></figcaption></figure>

### Status Downloader

* Any other Page: MB will add the TB Status Downloader to the top of the page.<br>

<figure><img src="https://3811773442-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiK3TemJSDhHz3xNMOvvk%2Fuploads%2FM6Z3mVkeI9PbD0qlwLdy%2Fimage.png?alt=media&#x26;token=fea638d8-d9db-4c8f-b2e8-4da11de1dff1" alt=""><figcaption></figcaption></figure>

To clear the behavior of the Magic Bookmark, simply refresh the page. All Bookmarklet functions are halted and destroyed when a new page is loaded.
