< back

New Scripts and themes designed for SmartCookieWeb.

Create a script

SmartCookieWeb uses the UserScript format supported in many other browsers.
An example script is shown below:

// ==UserScript==
// @name Test script
// @version 1.0.0
// @description Test script description goes here.
// @author CookieJarApps
// @match*
// @match*
// ==/UserScript==

This script, named 'Test script' shows an alert box containing 'hello!' on any page on the CookieJarApps or SmartCookieWeb website.
Below is a breakdown of the features available in the ==UserScript== header - any fields marked with * are required:

@name - UserScript name *

@namespace - A second unique script identifier, lets two scripts with the same name exist together (currently unused in SmartCookieWeb)

@version - UserScript version (currently unused in SmartCookieWeb, will later allow for script updates)

@description - UserScript description (currently unused in SmartCookieWeb)

@author - UserScript author *

@match - List of sites your script can apply on, wildcards are supported

@include - Regex URL pattern for selecting which sites your script will apply on

@run-at - Select from "document-idle" (once entire page is loaded - default), "document-start" (just before the main page starts loading) and "document-end" (after main page has loaded, before images load) to choose when exactly the script will run (currently unused in SmartCookieWeb)

@grant - Request permission to access restricted features (currently unused in SmartCookieWeb)

The remainder of the script is made up of plain JavaScript.