summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/webengine/doc/src/external-resources.qdoc10
-rw-r--r--src/webengine/doc/src/qtwebengine-overview.qdoc25
2 files changed, 33 insertions, 2 deletions
diff --git a/src/webengine/doc/src/external-resources.qdoc b/src/webengine/doc/src/external-resources.qdoc
index a75c7aaed..6cced588c 100644
--- a/src/webengine/doc/src/external-resources.qdoc
+++ b/src/webengine/doc/src/external-resources.qdoc
@@ -136,3 +136,13 @@
\externalpage https://http2.akamai.com/demo
\title Akamai HTTP/2 Demo
*/
+
+/*!
+ \externalpage https://www.chromium.org/developers/design-documents/user-scripts
+ \title User Scripts
+*/
+
+/*!
+ \externalpage https://wiki.greasespot.net/Metadata_Block#.40name
+ \title Metadata Block
+*/
diff --git a/src/webengine/doc/src/qtwebengine-overview.qdoc b/src/webengine/doc/src/qtwebengine-overview.qdoc
index e180b22c0..e9ca573b7 100644
--- a/src/webengine/doc/src/qtwebengine-overview.qdoc
+++ b/src/webengine/doc/src/qtwebengine-overview.qdoc
@@ -181,8 +181,29 @@
script to run, the injection point, and the world where the script is run. This enables
accessing the DOM to manipulate it within a world.
- The following \l Greasemonkey attributes are supported since Qt 5.8:
- \c @exclude, \c @include, \c @name, \c @match, and \c @run-at.
+ Since Qt 5.8, Qt WebEngine supports augmenting a script by using the
+ following \l{Metadata Block}{Greasemonkey-like attributes}:
+
+ \list
+ \li \c {@exclude <regexp>}
+ \li \c {@include <regexp>}
+ \li \c {@match <regexp>}
+ \li \c {@name <free text>}
+ \li \c {@run-at [document-start|document-end|document-idle]}
+ \endlist
+
+ The attributes determine if and when a \l {User Scripts}{user script} is
+ run. They must be placed immediately in the beginning of the script, inside
+ a \c ==UserScript== comment:
+
+ \code
+ // ==UserScript==
+ // @include http://*.qt.io/*
+ // @exclude http://wiki.qt.io/*
+ // ==/UserScript==
+
+ window.alert("Page is from qt.io, but not wiki.qt.io");
+ \endcode
\section1 Managing Certificates