# 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="/files/VHZWoJf3XL43Cdemyyj5" 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="/files/BYuVGpqBnPJkTrYGd9Gr" 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="/files/nHiYma39QoUY7id7nH5t" 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="/files/h5KHce0XnSdJcEuBrgk8" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/V7F21HWPUV0Cev8VS08G" 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="/files/3D6NcuOIqBvJsTVx3fwg" 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.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://prosbcdocs.telcobridges.com/tools-tips-and-tricks/telcobridges-magic-bookmark.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
