<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to Metadata_Block</title><link>https://sourceforge.net/p/greasemonkey/wiki/Metadata_Block/</link><description>Recent changes to Metadata_Block</description><atom:link href="https://sourceforge.net/p/greasemonkey/wiki/Metadata_Block/feed" rel="self"/><language>en</language><lastBuildDate>Mon, 01 Apr 2024 19:28:43 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/greasemonkey/wiki/Metadata_Block/feed" rel="self" type="application/rss+xml"/><item><title>Metadata_Block modified by mmartz</title><link>https://sourceforge.net/p/greasemonkey/wiki/Metadata_Block/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v305
+++ v306
@@ -507,7 +507,7 @@
 ```

 * This key can always be omitted and the original installation path will be used. This is the default if unspecified or unsupported.
-* The HTTP header,  `text/x-userscript-meta`,  should automatically be sent internally to reduce bandwidth and a quicker response by returning only the [Metadata Block](Metadata_Block) components supported from the host. Minimal requirement for the successful response is [@name](#name), [@namespace](#namespace), and [@version](#version) from the host jacketed in the UserScript metadata block.
+* The HTTP header,  `text/x-userscript-meta`,  should automatically be sent internally to reduce bandwidth and a quicker response by returning only the [Metadata Block](Metadata_Block) components supported from the host. Minimal requirement for a successful response is a [@version](#version) line inside the UserScript metadata block.
 * This key denotes where to check for updates for a [@version](#version) change. Ideally to prevent DoS and DDoS of any particular server it it strongly recommended to point to a simple metadata block and not the entire source script. This key can always be omitted and the original installation path will be used except when installation occurs from [userscripts.org][uso][⁸⁰⁸⁰][uso8080][&lt;sup&gt;⋔&lt;/sup&gt;][usoMirror]. The user.js portion of the installation URL will automatically converted to the meta.js URL for userscripts.org.
 * If this key is set when publishing to [userscripts.org][uso][⁸⁰⁸⁰][uso8080][&lt;sup&gt;⋔&lt;/sup&gt;][usoMirror], it is highly recommended to use the meta.js routine URL _(See the second usage example above... changing scriptid to your current numerical scriptid)_. This ensures that other Greasemonkey clones are following userscripts.org guidelines for update checking. This helps to prevent DoS and DDoS attacks for those clones that may implement script updating improperly.

&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">mmartz</dc:creator><pubDate>Mon, 01 Apr 2024 19:28:43 -0000</pubDate><guid>https://sourceforge.net57be433a6565a5e0e7f68342fbdcd1ec9cbc2815</guid></item><item><title>Metadata_Block modified by mmartz</title><link>https://sourceforge.net/p/greasemonkey/wiki/Metadata_Block/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v304
+++ v305
@@ -507,11 +507,11 @@
 ```

 * This key can always be omitted and the original installation path will be used. This is the default if unspecified or unsupported.
-* The HTTP header,  `text/x-userscript-meta`,  is automatically sent internally to reduce bandwidth and a quicker response by returning only the [Metadata Block](Metadata_Block) components supported from the host. Minimal requirement for the successful response is [@name](#name), [@namespace](#namespace), and [@version](#version) from the host jacketed in the UserScript metadata block.
+* The HTTP header,  `text/x-userscript-meta`,  should automatically be sent internally to reduce bandwidth and a quicker response by returning only the [Metadata Block](Metadata_Block) components supported from the host. Minimal requirement for the successful response is [@name](#name), [@namespace](#namespace), and [@version](#version) from the host jacketed in the UserScript metadata block.
+* This key denotes where to check for updates for a [@version](#version) change. Ideally to prevent DoS and DDoS of any particular server it it strongly recommended to point to a simple metadata block and not the entire source script. This key can always be omitted and the original installation path will be used except when installation occurs from [userscripts.org][uso][⁸⁰⁸⁰][uso8080][&lt;sup&gt;⋔&lt;/sup&gt;][usoMirror]. The user.js portion of the installation URL will automatically converted to the meta.js URL for userscripts.org.
 * If this key is set when publishing to [userscripts.org][uso][⁸⁰⁸⁰][uso8080][&lt;sup&gt;⋔&lt;/sup&gt;][usoMirror], it is highly recommended to use the meta.js routine URL _(See the second usage example above... changing scriptid to your current numerical scriptid)_. This ensures that other Greasemonkey clones are following userscripts.org guidelines for update checking. This helps to prevent DoS and DDoS attacks for those clones that may implement script updating improperly.
-* This key denotes where to check for updates for a [@version](#version) change. Ideally to prevent DoS and DDoS of any particular server it it strongly recommended to point to a simple metadata block and not the entire source script. This key can always be omitted and the original installation path will be used except when installation occurs from [userscripts.org][uso][⁸⁰⁸⁰][uso8080][&lt;sup&gt;⋔&lt;/sup&gt;][usoMirror]. The user.js portion of the installation URL will automatically converted to the meta.js URL for userscripts.org.
-
-* **NOTE:** The current upstream and release Greasemonkey is not properly detecting the userscripts.org @updateURL and may be using a special CDN to intercept some of your daily update checks. If you wish to bypass this remote domain by restoring proper usage of the meta.js routine on userscripts.org please use this remote forks repository with the following git commands, or if available in the [files section][gmSFFiles] of this project. Remember to manually check for updates in Firefox otherwise next release will automatically be from upstream.:
+
+* **NOTE:** Some upstream releases of Greasemonkey may not be properly detecting the userscripts.org @updateURL and may be using a special CDN to intercept some of your daily update checks. If you wish to bypass this remote domain by restoring proper usage of the meta.js routine on userscripts.org please use this remote forks repository with the following git commands, or if available in the [files section][gmSFFiles] of this project. Remember to manually check for updates in Firefox otherwise next release will automatically be from upstream.:

 ```shell-session
 $ git clone git://git.code.sf.net/p/greasemonkey/code greasemonkey
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">mmartz</dc:creator><pubDate>Mon, 01 Apr 2024 18:52:03 -0000</pubDate><guid>https://sourceforge.netc09b06e8c95e89c8ae26ee78548b2e6858522d5f</guid></item><item><title>Metadata_Block modified by mmartz</title><link>https://sourceforge.net/p/greasemonkey/wiki/Metadata_Block/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v303
+++ v304
@@ -507,7 +507,7 @@
 ```

 * This key can always be omitted and the original installation path will be used. This is the default if unspecified or unsupported.
-* The HTTP header,  `text/x-userscript-meta`,  is automatically sent internally to reduce bandwidth and a quicker response by returning only the [Metadata Block](Metadata_Block) components supported from the host. Minimal requirements for returning are [@name](#name), [@namespace](#namespace), and [@version](#version) from the host to facilitate the update URL check.
+* The HTTP header,  `text/x-userscript-meta`,  is automatically sent internally to reduce bandwidth and a quicker response by returning only the [Metadata Block](Metadata_Block) components supported from the host. Minimal requirement for the successful response is [@name](#name), [@namespace](#namespace), and [@version](#version) from the host jacketed in the UserScript metadata block.
 * If this key is set when publishing to [userscripts.org][uso][⁸⁰⁸⁰][uso8080][&lt;sup&gt;⋔&lt;/sup&gt;][usoMirror], it is highly recommended to use the meta.js routine URL _(See the second usage example above... changing scriptid to your current numerical scriptid)_. This ensures that other Greasemonkey clones are following userscripts.org guidelines for update checking. This helps to prevent DoS and DDoS attacks for those clones that may implement script updating improperly.
 * This key denotes where to check for updates for a [@version](#version) change. Ideally to prevent DoS and DDoS of any particular server it it strongly recommended to point to a simple metadata block and not the entire source script. This key can always be omitted and the original installation path will be used except when installation occurs from [userscripts.org][uso][⁸⁰⁸⁰][uso8080][&lt;sup&gt;⋔&lt;/sup&gt;][usoMirror]. The user.js portion of the installation URL will automatically converted to the meta.js URL for userscripts.org.

&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">mmartz</dc:creator><pubDate>Mon, 01 Apr 2024 18:47:48 -0000</pubDate><guid>https://sourceforge.net964b5dcc261090a2c82b6427b4bc5b39e0c6d3ff</guid></item><item><title>Metadata_Block modified by mmartz</title><link>https://sourceforge.net/p/greasemonkey/wiki/Metadata_Block/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v302
+++ v303
@@ -507,7 +507,7 @@
 ```

 * This key can always be omitted and the original installation path will be used. This is the default if unspecified or unsupported.
-* The HTTP header ,  `text/x-userscript-meta`,  is automatically sent internally to reduce bandwidth and a quicker response by returning only the [Metadata Block](Metadata_Block) components supported from the host. Minimal requirements for returning are [@name](#name), [@namespace](#namespace), and [@version](#version) from the host to facilitate the update URL check.
+* The HTTP header,  `text/x-userscript-meta`,  is automatically sent internally to reduce bandwidth and a quicker response by returning only the [Metadata Block](Metadata_Block) components supported from the host. Minimal requirements for returning are [@name](#name), [@namespace](#namespace), and [@version](#version) from the host to facilitate the update URL check.
 * If this key is set when publishing to [userscripts.org][uso][⁸⁰⁸⁰][uso8080][&lt;sup&gt;⋔&lt;/sup&gt;][usoMirror], it is highly recommended to use the meta.js routine URL _(See the second usage example above... changing scriptid to your current numerical scriptid)_. This ensures that other Greasemonkey clones are following userscripts.org guidelines for update checking. This helps to prevent DoS and DDoS attacks for those clones that may implement script updating improperly.
 * This key denotes where to check for updates for a [@version](#version) change. Ideally to prevent DoS and DDoS of any particular server it it strongly recommended to point to a simple metadata block and not the entire source script. This key can always be omitted and the original installation path will be used except when installation occurs from [userscripts.org][uso][⁸⁰⁸⁰][uso8080][&lt;sup&gt;⋔&lt;/sup&gt;][usoMirror]. The user.js portion of the installation URL will automatically converted to the meta.js URL for userscripts.org.

&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">mmartz</dc:creator><pubDate>Mon, 01 Apr 2024 18:41:49 -0000</pubDate><guid>https://sourceforge.net91b0e0385e7d827f72e2341d3346421cf4790d8c</guid></item><item><title>Metadata_Block modified by mmartz</title><link>https://sourceforge.net/p/greasemonkey/wiki/Metadata_Block/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v301
+++ v302
@@ -507,6 +507,7 @@
 ```

 * This key can always be omitted and the original installation path will be used. This is the default if unspecified or unsupported.
+* The HTTP header ,  `text/x-userscript-meta`,  is automatically sent internally to reduce bandwidth and a quicker response by returning only the [Metadata Block](Metadata_Block) components supported from the host. Minimal requirements for returning are [@name](#name), [@namespace](#namespace), and [@version](#version) from the host to facilitate the update URL check.
 * If this key is set when publishing to [userscripts.org][uso][⁸⁰⁸⁰][uso8080][&lt;sup&gt;⋔&lt;/sup&gt;][usoMirror], it is highly recommended to use the meta.js routine URL _(See the second usage example above... changing scriptid to your current numerical scriptid)_. This ensures that other Greasemonkey clones are following userscripts.org guidelines for update checking. This helps to prevent DoS and DDoS attacks for those clones that may implement script updating improperly.
 * This key denotes where to check for updates for a [@version](#version) change. Ideally to prevent DoS and DDoS of any particular server it it strongly recommended to point to a simple metadata block and not the entire source script. This key can always be omitted and the original installation path will be used except when installation occurs from [userscripts.org][uso][⁸⁰⁸⁰][uso8080][&lt;sup&gt;⋔&lt;/sup&gt;][usoMirror]. The user.js portion of the installation URL will automatically converted to the meta.js URL for userscripts.org.

&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">mmartz</dc:creator><pubDate>Mon, 01 Apr 2024 18:40:22 -0000</pubDate><guid>https://sourceforge.net416c72aa4a1e3035a4d018ee56e7440830837432</guid></item><item><title>Metadata_Block modified by mmartz</title><link>https://sourceforge.net/p/greasemonkey/wiki/Metadata_Block/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v300
+++ v301
@@ -506,6 +506,7 @@
 // @updateURL https://userscripts.org/scripts/source/scriptid.meta.js
 ```

+* This key can always be omitted and the original installation path will be used. This is the default if unspecified or unsupported.
 * If this key is set when publishing to [userscripts.org][uso][⁸⁰⁸⁰][uso8080][&lt;sup&gt;⋔&lt;/sup&gt;][usoMirror], it is highly recommended to use the meta.js routine URL _(See the second usage example above... changing scriptid to your current numerical scriptid)_. This ensures that other Greasemonkey clones are following userscripts.org guidelines for update checking. This helps to prevent DoS and DDoS attacks for those clones that may implement script updating improperly.
 * This key denotes where to check for updates for a [@version](#version) change. Ideally to prevent DoS and DDoS of any particular server it it strongly recommended to point to a simple metadata block and not the entire source script. This key can always be omitted and the original installation path will be used except when installation occurs from [userscripts.org][uso][⁸⁰⁸⁰][uso8080][&lt;sup&gt;⋔&lt;/sup&gt;][usoMirror]. The user.js portion of the installation URL will automatically converted to the meta.js URL for userscripts.org.

@@ -542,7 +543,7 @@
 // @downloadURL https://userscripts.org/scripts/source/scriptid.user.js
 ```

-* This key can always be omitted and the original installation path will be used.
+* This key can always be omitted and the original installation path will be used. This is the default if unspecified or unsupported.
 * This key may optionally be set when publishing to [userscripts.org][uso][⁸⁰⁸⁰][uso8080][&lt;sup&gt;⋔&lt;/sup&gt;][usoMirror]. _(See the second usage example above... changing scriptid to your current numerical scriptid)_
 * NOTE: @downloadURL is a later addition that currently means the same thing as @installURL.

&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">mmartz</dc:creator><pubDate>Mon, 01 Apr 2024 18:26:51 -0000</pubDate><guid>https://sourceforge.net6851e66fd3ba7e0bffd4afd0d49aa6111ba15492</guid></item><item><title>Metadata_Block modified by mmartz</title><link>https://sourceforge.net/p/greasemonkey/wiki/Metadata_Block/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v299
+++ v300
@@ -1147,7 +1147,7 @@

 #### Restructuring with GM_info

-The last known native UserScript Metadata Block is available with [GM_info]. Retrieve this String and pass to the parsing routine.
+The last known native UserScript Metadata Block is available with [GM_info](GM_info). Retrieve this String and pass to the parsing routine.

 * This approach is currently limited to the Greasemonkey add-on and Greasemonkey compatible extensions.
 * `GM_info.script` may have some scoping issues with certain Object types such as iterating over the [@resource](#resource) values contained in `GM_info.script.resources` with [for…in][mdnForIn]
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">mmartz</dc:creator><pubDate>Thu, 27 Jan 2022 23:13:16 -0000</pubDate><guid>https://sourceforge.netf84fe5a4026852aff514f8ddc0631597e9b94305</guid></item><item><title>Metadata_Block modified by mmartz</title><link>https://sourceforge.net/p/greasemonkey/wiki/Metadata_Block/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v298
+++ v299
@@ -1070,7 +1070,6 @@
   }));
 ```

-
 [⬆][toTop] [⬇][toBottom] [⇧](#examples) [⇭](#knowing-your-own-metadata)

 #### Restructuring with E4X XMLList
@@ -1108,7 +1107,6 @@
   );
 ```

-
 [⬆][toTop] [⬇][toBottom] [⇧](#examples) [⇭](#knowing-your-own-metadata)

 #### Restructuring with ES6+ Template Literals
@@ -1121,8 +1119,8 @@
 * Remember to change the [@uso:script](#usoscript) key to match the _scriptid_ hosted on userscripts.org.

 ```js
-  var fileMETA = parseHeaders(
-`
+  var fileMETA = parseHeaders(`
+  
 // ==UserScript==
 // @name          My Script
 // @namespace     https://www.example.com/gmscripts
@@ -1139,6 +1137,7 @@
 // @grant         none
 // @uso:script    scriptid
 // ==/UserScript==
+
 `
   );
 ```
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">mmartz</dc:creator><pubDate>Fri, 27 Sep 2019 22:31:33 -0000</pubDate><guid>https://sourceforge.net7eb67b70beee08a24da8e599e8f275772d4dc1d4</guid></item><item><title>Metadata_Block modified by mmartz</title><link>https://sourceforge.net/p/greasemonkey/wiki/Metadata_Block/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v297
+++ v298
@@ -1047,7 +1047,7 @@

 ```js

-var fileMETA = parseHeaders((function () {
+  var fileMETA = parseHeaders((function () {

 // ==UserScript==
 // @name          My Script
@@ -1067,8 +1067,7 @@
 // @uso:script    scriptid
 // ==/UserScript==

-}));
-
+  }));
 ```


@@ -1107,7 +1106,6 @@

 ]]&amp;gt;.toString()
   );
-
 ```


@@ -1123,8 +1121,8 @@
 * Remember to change the [@uso:script](#usoscript) key to match the _scriptid_ hosted on userscripts.org.

 ```js
-var fileMETA = parseHeaders(`
-
+  var fileMETA = parseHeaders(
+`
 // ==UserScript==
 // @name          My Script
 // @namespace     https://www.example.com/gmscripts
@@ -1141,8 +1139,8 @@
 // @grant         none
 // @uso:script    scriptid
 // ==/UserScript==
-
-`);
+`
+  );
 ```


@@ -1177,12 +1175,12 @@
 // @uso:script    scriptid
 // ==/UserScript==

-var fileMETA = parseHeaders(
-  GM_info.scriptMetaStr
-
-  /* These methods are optional and mutually inclusive for tidiness */
-  .trim().split(/\n/).map(function (e) { return e.trim(); }).join("\n")
-);
+  var fileMETA = parseHeaders(
+    GM_info.scriptMetaStr
+
+    /* These methods are optional and mutually inclusive for tidiness */
+    .trim().split(/\n/).map(function (e) { return e.trim(); }).join("\n")
+  );
 ```

 [⬆][toTop] [⬇][toBottom] [⇧](#examples) [⇭](#knowing-your-own-metadata)
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">mmartz</dc:creator><pubDate>Fri, 27 Sep 2019 22:17:08 -0000</pubDate><guid>https://sourceforge.net5a5ea9f6c333317f32f7877503c385efc954f5be</guid></item><item><title>Metadata_Block modified by mmartz</title><link>https://sourceforge.net/p/greasemonkey/wiki/Metadata_Block/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v296
+++ v297
@@ -993,7 +993,7 @@
 ```js
 function parseHeaders(metadataBlock) {
   metadataBlock = metadataBlock.toString();
-  var re = /\/\/ @(\S+)(?:\s+(.*))?/;
+  var re = /^\/\/ @(\S+)(?:\s+(.*))?/;
   var headers = {};
   var name, prefix, header, key, value;
     var lines = metadataBlock.split(/[\r\n]+/).filter(function (e, i, a) {
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">mmartz</dc:creator><pubDate>Fri, 27 Sep 2019 22:05:53 -0000</pubDate><guid>https://sourceforge.netfd846dddf8bdc3aa420e7d64f01661f57c3bc0fe</guid></item></channel></rss>