{"id":17606488,"url":"https://github.com/revolter/min","last_synced_at":"2026-02-03T01:03:00.021Z","repository":{"id":44173833,"uuid":"134089995","full_name":"revolter/min","owner":"revolter","description":"Collection of functions used for DOM manipulations in Userscripts","archived":false,"fork":false,"pushed_at":"2023-01-04T21:37:13.000Z","size":1121,"stargazers_count":0,"open_issues_count":15,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-19T23:45:30.120Z","etag":null,"topics":["userscript"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/revolter.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-05-19T18:58:18.000Z","updated_at":"2024-04-03T06:22:30.000Z","dependencies_parsed_at":"2023-02-02T20:45:55.308Z","dependency_job_id":null,"html_url":"https://github.com/revolter/min","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/revolter/min","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/revolter%2Fmin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/revolter%2Fmin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/revolter%2Fmin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/revolter%2Fmin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/revolter","download_url":"https://codeload.github.com/revolter/min/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/revolter%2Fmin/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261749173,"owners_count":23203989,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["userscript"],"created_at":"2024-10-22T15:44:37.698Z","updated_at":"2026-02-03T01:02:59.993Z","avatar_url":"https://github.com/revolter.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# min\n\nCollection of functions used for DOM manipulations in Userscripts.\n\n## Development\n\n-   Run `npm install` to install the dependencies.\n-   Run `npm run lint-code` to check for errors in the code.\n-   Run `npm run fix-code` to fix errors in the code.\n-   Run `npm run build-code` to update the minified version.\n-   Run `npm run lint-docs` to check for errors in the documentation.\n-   Run `npm run build-docs` to update the documentation.\n-   Run `npm run build` to run all the scripts at the same time, except\n    `fix-code` and `lint-docs`.\n\n## Documentation\n\n\u003c!-- Generated by documentation.js. Update this documentation by updating the source code. --\u003e\n\n#### Table of Contents\n\n-   [min](#min)\n-   [NOT_FOUND](#not_found)\n-   [EMPTY](#empty)\n-   [FIRST](#first)\n-   [FIRST](#first-1)\n-   [dom](#dom)\n-   [ALL](#all)\n-   [getById](#getbyid)\n    -   [Parameters](#parameters)\n-   [getByClassName](#getbyclassname)\n    -   [Parameters](#parameters-1)\n-   [getByTagName](#getbytagname)\n    -   [Parameters](#parameters-2)\n-   [getByQuery](#getbyquery)\n    -   [Parameters](#parameters-3)\n-   [getByXPath](#getbyxpath)\n    -   [Parameters](#parameters-4)\n-   [getByMeta](#getbymeta)\n    -   [Parameters](#parameters-5)\n-   [create](#create)\n    -   [Parameters](#parameters-6)\n-   [style](#style)\n    -   [Parameters](#parameters-7)\n-   [style](#style-1)\n    -   [Parameters](#parameters-8)\n-   [removeNode](#removenode)\n    -   [Parameters](#parameters-9)\n-   [removeNodes](#removenodes)\n    -   [Parameters](#parameters-10)\n-   [insertBefore](#insertbefore)\n    -   [Parameters](#parameters-11)\n-   [insertAfter](#insertafter)\n    -   [Parameters](#parameters-12)\n-   [addObserver](#addobserver)\n    -   [Parameters](#parameters-13)\n-   [onNodeExists](#onnodeexists)\n    -   [Parameters](#parameters-14)\n-   [onNodesExist](#onnodesexist)\n    -   [Parameters](#parameters-15)\n-   [onNodeInserted](#onnodeinserted)\n    -   [Parameters](#parameters-16)\n-   [iframe](#iframe)\n    -   [Parameters](#parameters-17)\n-   [gm](#gm)\n-   [get](#get)\n    -   [Parameters](#parameters-18)\n-   [set](#set)\n    -   [Parameters](#parameters-19)\n-   [add](#add)\n    -   [Parameters](#parameters-20)\n-   [remove](#remove)\n    -   [Parameters](#parameters-21)\n-   [clear](#clear)\n    -   [Parameters](#parameters-22)\n-   [contains](#contains)\n    -   [Parameters](#parameters-23)\n-   [read](#read)\n    -   [Parameters](#parameters-24)\n-   [xhr](#xhr)\n    -   [Parameters](#parameters-25)\n-   [concatenate](#concatenate)\n    -   [Parameters](#parameters-26)\n-   [toArray](#toarray)\n    -   [Parameters](#parameters-27)\n-   [forEach](#foreach)\n    -   [Parameters](#parameters-28)\n-   [isOnWebsite](#isonwebsite)\n    -   [Parameters](#parameters-29)\n-   [isOnPath](#isonpath)\n    -   [Parameters](#parameters-30)\n-   [isOnIframe](#isoniframe)\n\n### min\n\nCollection of functions used for DOM manipulations in Userscripts.\n\nType: [Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)\n\n### NOT_FOUND\n\nConstant used for items not found in search operations.\n\nType: [number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)\n\n### EMPTY\n\nConstant used for empty lists.\n\nType: [number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)\n\n### FIRST\n\nConstant used for accessing the first item in a list.\n\nType: [number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)\n\n### FIRST\n\nConstant used for nodes getter methods to return the first matching node.\n\nType: [number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)\n\n### dom\n\nCollection of DOM manipulation functions.\n\nType: [Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)\n\n### ALL\n\nConstant used for nodes getter methods to return all the matching nodes.\n\nType: [number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)\n\n### getById\n\nReturns the node by the given id.\n\n#### Parameters\n\n-   `id` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** The id of the node.\n\nReturns **[HTMLElement](https://developer.mozilla.org/docs/Web/HTML/Element)** The node with the given id.\n\n### getByClassName\n\nReturns the node or the nodes by the given class name.\n\n#### Parameters\n\n-   `className` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** The class name of the node.\n-   `index` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** Optional position of the node in the array of those found (defaults to the first one). (optional, default `min.dom.FIRST`)\n-   `scope` **[HTMLElement](https://developer.mozilla.org/docs/Web/HTML/Element)** Optional root node in which to search. (optional, default `document`)\n-   `rootWindow` **[Window](https://developer.mozilla.org/docs/Web/API/Window)** Optional root window of the scope. (optional, default `window`)\n\nReturns **([HTMLElement](https://developer.mozilla.org/docs/Web/HTML/Element) | HTMLCollection | null)** The node or the array of nodes with the given class name or null if scope is not an HTMLElement.\n\n### getByTagName\n\nReturns the node or the nodes by the given tag name.\n\n#### Parameters\n\n-   `tagName` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** The tag name of the node.\n-   `index` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** Optional position of the node in the array of those found (defaults to the first one). (optional, default `min.dom.FIRST`)\n-   `scope` **[HTMLElement](https://developer.mozilla.org/docs/Web/HTML/Element)** Optional root node in which to search. (optional, default `document`)\n-   `rootWindow` **[Window](https://developer.mozilla.org/docs/Web/API/Window)** Optional root window of the scope. (optional, default `window`)\n\nReturns **([HTMLElement](https://developer.mozilla.org/docs/Web/HTML/Element) | HTMLCollection | null)** The node or the array of nodes with the given tag name or null if scope is not an HTMLElement.\n\n### getByQuery\n\nReturns the node or the nodes by the given css query.\n\n#### Parameters\n\n-   `query` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** The query string for searching the node.\n-   `index` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** Optional position of the node in the array of those found (defaults to the first one). (optional, default `min.dom.FIRST`)\n-   `scope` **[HTMLElement](https://developer.mozilla.org/docs/Web/HTML/Element)** Optional root node in which to search. (optional, default `document`)\n-   `rootWindow` **[Window](https://developer.mozilla.org/docs/Web/API/Window)** Optional root window of the scope. (optional, default `window`)\n\nReturns **([HTMLElement](https://developer.mozilla.org/docs/Web/HTML/Element) \\| [Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)\u0026lt;[HTMLElement](https://developer.mozilla.org/docs/Web/HTML/Element)\u003e | null)** The node or the array of nodes with the given css query or null if scope is not an HTMLElement.\n\n### getByXPath\n\nReturns the node or the nodes by the given xPath location.\n\n#### Parameters\n\n-   `xPath` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** The xPath location the node.\n-   `index` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** Optional position of the node in the array of those found (defaults to the first one). (optional, default `min.dom.FIRST`)\n-   `scope` **[HTMLElement](https://developer.mozilla.org/docs/Web/HTML/Element)** Optional root node in which to search. (optional, default `document`)\n-   `rootWindow` **[Window](https://developer.mozilla.org/docs/Web/API/Window)** Optional root window of the scope. (optional, default `window`)\n\nReturns **([HTMLElement](https://developer.mozilla.org/docs/Web/HTML/Element) \\| [Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)\u0026lt;[HTMLElement](https://developer.mozilla.org/docs/Web/HTML/Element)\u003e | null)** The node or the array of nodes with the given xPath location or null if scope is not an HTMLElement.\n\n### getByMeta\n\nReturns the node or the nodes by the given attribute name and value.\n\n#### Parameters\n\n-   `propertyName` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** The attribute name of the node.\n-   `value` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** The value of the attribute.\n\nReturns **[HTMLElement](https://developer.mozilla.org/docs/Web/HTML/Element)** The node with the given attribute name and value.\n\n### create\n\nCreates an HTMLElement node.\n\n#### Parameters\n\n-   `tagName` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** The tag name of the node.\n-   `attributes` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** Optional attributes for the node. (optional, default `null`)\n\nReturns **[HTMLElement](https://developer.mozilla.org/docs/Web/HTML/Element)** The requested node.\n\n### style\n\nAdds a css style to a node.\n\n#### Parameters\n\n-   `node` **[HTMLElement](https://developer.mozilla.org/docs/Web/HTML/Element)** The node for which to add the style.\n-   `style` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** An object with css property and value pairs.\n\n### style\n\nAdds a css style.\n\n#### Parameters\n\n-   `styles` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** An object with selector and style pairs.\n\n### removeNode\n\nRemoves a node.\n\n#### Parameters\n\n-   `node` **[HTMLElement](https://developer.mozilla.org/docs/Web/HTML/Element)** The node to be removed.\n\n### removeNodes\n\nRemoves a list of nodes.\n\n#### Parameters\n\n-   `getterOrNodes` **([Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function) \\| [Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)\u0026lt;[HTMLElement](https://developer.mozilla.org/docs/Web/HTML/Element)\u003e)** Getter function for the node or a list of nodes to be removed.\n-   `paramOrParams` **([string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) \\| [Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)\u0026lt;[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)\u003e | [HTMLElement](https://developer.mozilla.org/docs/Web/HTML/Element))?** Parameter or parameters needed for the getter. Optional if a list of nodes is passed for `getterOrNodes`.\n-   `args` **...any** \n\n### insertBefore\n\nInserts a node before another existing one.\n\n#### Parameters\n\n-   `node` **[HTMLElement](https://developer.mozilla.org/docs/Web/HTML/Element)** The node to be inserted.\n-   `reference` **[HTMLElement](https://developer.mozilla.org/docs/Web/HTML/Element)** The node before which the specified node will be inserted.\n\n### insertAfter\n\nInserts a node after another existing one.\n\n#### Parameters\n\n-   `node` **[HTMLElement](https://developer.mozilla.org/docs/Web/HTML/Element)** The node to be inserted.\n-   `reference` **[HTMLElement](https://developer.mozilla.org/docs/Web/HTML/Element)** The node after which the specified node will be inserted.\n\n### addObserver\n\nCreates an observer with a given callback.\n\n#### Parameters\n\n-   `callback` **[Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)** The callback function.\n-   `root` **[HTMLElement](https://developer.mozilla.org/docs/Web/HTML/Element)** Optional root node on which to observe mutations. (optional, default `document.body`)\n-   `options` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** Optional parameters to pass to the observer. (optional, default `{childList:true,subtree:true}`)\n\n### onNodeExists\n\nRegisters a function to be called when a node is first inserted in the DOM.\n\n#### Parameters\n\n-   `getter` **[Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)** Getter function for the node.\n-   `paramOrParams` **([string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) \\| [Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)\u0026lt;[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)\u003e)** Parameter or parameters needed for the getter.\n-   `callback` **[Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)** The callback function.\n-   `disconnect` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** Set to false to prevent the observer to disconnect after the node is found. (optional, default `true`)\n\n### onNodesExist\n\nRegisters a function to be called when some nodes are first inserted in the DOM.\n\nThe `args` must contains these keys:\n\n-   `{Function}` _getter_\n-   `{string[]}` _params_\n\nor\n\n-   `{string[][]}` _rules_\n\n#### Parameters\n\n-   `args` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** Object containing the rules for retrieving the nodes.\n-   `callback` **[Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)** The callback function.\n\n### onNodeInserted\n\nRegisters a function to be called when nodes are inserted in the DOM.\n\n#### Parameters\n\n-   `callback` **[Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)** The callback function.\n-   `root` **[HTMLElement](https://developer.mozilla.org/docs/Web/HTML/Element)** Optional root node on which to observe mutations. (optional, default `document.body`)\n\n### iframe\n\nMakes an iframe and returns the content document. It also\nremoves it after returning from the callback.\n\n#### Parameters\n\n-   `url` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** The url for the iframe.\n-   `callback` **[Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)** The callback function.\n-   `scope` **[HTMLElement](https://developer.mozilla.org/docs/Web/HTML/Element)** Optional root node in\n      which to append the iframe. (optional, default `document`)\n\n### gm\n\nCollection of GreaseMonkey specific functions.\n\nReturns **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** The collection of functions.\n\n### get\n\nRetrieves a stored entry value.\n\n#### Parameters\n\n-   `entryName` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** The name of the entry.\n\nReturns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** The entry's value or empty string.\n\n### set\n\nStores an entry.\n\n#### Parameters\n\n-   `entryName` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** The name of the entry.\n-   `value` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** The value of the entry.\n\n### add\n\nAppends an item to the stored entry's value.\n\n#### Parameters\n\n-   `entryName` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** The name of the entry.\n-   `item` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** The item to be appended.\n\n### remove\n\nRemoves an item from the stored entry's value.\n\n#### Parameters\n\n-   `entryName` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** The name of the entry.\n-   `item` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** The item to be removed.\n\n### clear\n\nRemoves all the items from the stored entry's value.\n\n#### Parameters\n\n-   `entryName` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** The name of the entry.\n\n### contains\n\nChecks if the stored entry's value contains an item.\n\n#### Parameters\n\n-   `entryName` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** The name of the entry.\n-   `item` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** The item to be searched.\n\nReturns **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** Indicates if the item exists.\n\n### read\n\nReads content from a resource file.\n\n#### Parameters\n\n-   `resourceName` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** The resource's name.\n\nReturns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** The content of the resource file.\n\n### xhr\n\nMakes an XMLHttpRequest and returns the response as HTML or\nraw.\n\n#### Parameters\n\n-   `url` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** The url of the request.\n-   `callback` **[Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)** The callback function.\n-   `context` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** Optional object to be passed\n      to the callback function. (optional, default `null`)\n-   `method` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** Optional request method\n      (defaults to \"GET\"). (optional, default `\"GET\"`)\n-   `headers` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** Optional request headers. (optional, default `null`)\n-   `raw` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** Indicates if the response\n      should be treated as HTML or not. (optional, default `false`)\n\n### concatenate\n\nConcatenates two collections and returns the result.\n\n#### Parameters\n\n-   `first` **([Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)\u0026lt;[HTMLElement](https://developer.mozilla.org/docs/Web/HTML/Element)\u003e | HTMLCollection)** The first collection.\n-   `second` **([Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)\u0026lt;[HTMLElement](https://developer.mozilla.org/docs/Web/HTML/Element)\u003e | HTMLCollection)** The second collection.\n\nReturns **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)\u0026lt;[HTMLElement](https://developer.mozilla.org/docs/Web/HTML/Element)\u003e** The resulting array.\n\n### toArray\n\nConverts an array-like object to an Array.\n\n#### Parameters\n\n-   `collection` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** The collection to be converted.\n\nReturns **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)\u0026lt;[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)\u003e** The resulting array.\n\n### forEach\n\nExecutes a function on elements of an array.\nReturn `true` from the `callback` to stop the loop.\n\n#### Parameters\n\n-   `array` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)\u0026lt;[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)\u003e** The array to be iterated.\n-   `callback` **[Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)** The callback function.\n\n### isOnWebsite\n\nChecks if current location is on given host.\n\n#### Parameters\n\n-   `hostName` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** The hostname to test against.\n\nReturns **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** Indicates if the location is on host.\n\n### isOnPath\n\nChecks if current location is on given path.\n\n#### Parameters\n\n-   `path` **([string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) \\| [RegExp](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp))** The path to test against or a regular expression to test it.\n-   `exact` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** Pass `true` to match the exact path. (optional, default `false`)\n\nReturns **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** Indicates if the location is on path.\n\n### isOnIframe\n\nChecks if running from an iframe.\n\nReturns **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** Indicates if the script is running from an iframe.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frevolter%2Fmin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frevolter%2Fmin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frevolter%2Fmin/lists"}