From 3d1ce836d2e4c8138e84ffa6118cfe919451ab16 Mon Sep 17 00:00:00 2001 From: Thomas O'Brien Date: Fri, 7 Feb 2020 12:02:11 +0000 Subject: [PATCH] Updating the README for v1.2 --- README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 00ac21b..a742060 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ Instructions: - At the top of your Tampermonkey script, ensure you have the following lines: ``` // @grant unsafeWindow -// @require https://raw.githubusercontent.com/Tro95/Pardus-Options-Library/v1.1/pardus_options_library.js +// @require https://raw.githubusercontent.com/Tro95/Pardus-Options-Library/v1.2/pardus_options_library.js ``` This will allow the unsafeWindow permision within your script, which is necessary to guarantee safe interactions with other scripts utilising this library also. This will also include the library @@ -27,12 +27,12 @@ if (document.location.pathname == '/options.php') { - Add a new tab to the Options page. Recommended usage is one tab per script or userspace. ``` -unsafeWindow.Options.addNewTab(label, id) +unsafeWindow.Options.addNewTab(label, id, GM_setValue, GM_getValue) ``` -label: String to display in the tab. Visual limitations means this can only be a maximum - of two words, 10 characters each. -id: HTML element id for the tab. This should be a string with no whitespace, convention - is to all be lowercase and words separated with hyphens. +label: String to display in the tab. Visual limitations means this can only be a maximum + of two words, 10 characters each. +id: HTML element id for the tab. This should be a string with no whitespace, convention + is to all be lowercase and words separated with hyphens. Returns: OptionsContext object. This should be assigned to a variable that is then used to add options boxes into the tab.