Skip to content

Commit

Permalink
Moving the extract logic out of the build script.
Browse files Browse the repository at this point in the history
  • Loading branch information
Cerbrus committed Mar 21, 2017
1 parent 5bb9279 commit 522e8e6
Show file tree
Hide file tree
Showing 11 changed files with 141 additions and 19 deletions.
6 changes: 6 additions & 0 deletions .on-save.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
[
{
"srcDir": "",
"destDir": "",
"files": "**/*.user.js",
"command": "extractScriptMetadata.sh ${srcFile}"
},
{
"srcDir": "",
"destDir": "",
Expand Down
24 changes: 24 additions & 0 deletions aeks/aeks.meta.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
// ==UserScript==
// @name Automatically Enable Keyboard Shortcuts
// @namespace https://github.com/Charcoal-SE/
// @description Automatically enable keyboard shortcuts for any SE site you're on. This may require a reload for the setting to take effect.
// @author Cerbrus
// @attribution Michiel Dommerholt (https://github.com/Cerbrus)
// @version 1.1.0
// @updateURL https://raw.githubusercontent.com/Charcoal-SE/Userscripts/master/aeks/aeks.meta.js
// @downloadURL https://raw.githubusercontent.com/Charcoal-SE/Userscripts/master/aeks/aeks.user.js
// @supportURL https://github.com/Charcoal-SE/Userscripts/issues
// @match *://*.stackexchange.com/*
// @match *://*.stackoverflow.com/*
// @match *://*.superuser.com/*
// @match *://*.serverfault.com/*
// @match *://*.askubuntu.com/*
// @match *://*.stackapps.com/*
// @match *://*.mathoverflow.net/*
// @exclude *://chat.stackexchange.com/*
// @exclude *://chat.meta.stackexchange.com/*
// @exclude *://chat.stackoverflow.com/*
// @exclude *://blog.stackoverflow.com/*
// @exclude *://*.area51.stackexchange.com/*
// @grant none
// ==/UserScript==
19 changes: 19 additions & 0 deletions autoflagging/autoflagging.meta.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// ==UserScript==
// @name Autoflagging Information & More
// @namespace https://github.com/Charcoal-SE/
// @description AIM adds autoflagging, deletion and feedback information to Charcoal HQ.
// @author Glorfindel
// @author J F
// @contributor angussidney
// @contributor ArtOfCode
// @contributor Cerbrus
// @version 0.13.6
// @updateURL https://raw.githubusercontent.com/Charcoal-SE/Userscripts/master/autoflagging/autoflagging.meta.js
// @downloadURL https://raw.githubusercontent.com/Charcoal-SE/Userscripts/master/autoflagging/autoflagging.user.js
// @supportURL https://github.com/Charcoal-SE/Userscripts/issues
// @match *://chat.stackexchange.com/rooms/11540/charcoal-hq*
// @match *://chat.stackoverflow.com/rooms/41570/so-close-vote-reviewers*
// @match *://chat.meta.stackexchange.com/rooms/89/tavern-on-the-meta*
// @require https://cdn.rawgit.com/joewalnes/reconnecting-websocket/f8055b77ba75e5d564ffb50d20a483bdd7edccdf/reconnecting-websocket.min.js
// @grant none
// ==/UserScript==
4 changes: 0 additions & 4 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,3 @@ do
fi
cd ..
done

echo "Extracting userscript meta blocks."
./extractUserScriptMeta.sh
echo "Done extracting userscript meta blocks."
8 changes: 8 additions & 0 deletions extractScriptMetadata.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash
# Generate <script>.meta.js files containing only the script's metadata,
# so the whole script doesn't have to be downloaded to check for updates.
# Example use:
# // @updateURL https://raw.githubusercontent.com/Charcoal-SE/Userscripts/master/fire/fire.meta.js
# // @downloadURL https://raw.githubusercontent.com/Charcoal-SE/Userscripts/master/fire/fire.user.js

sed -e '/./{H;$!d;}' -e 'x;/UserScript/!d;' $1 | awk '!/^$/' > ${1/.user./.meta.}
15 changes: 0 additions & 15 deletions extractUserScriptMeta.sh

This file was deleted.

27 changes: 27 additions & 0 deletions fdsc/fdsc.meta.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
// ==UserScript==
// @name Flag Dialog Smokey Controls
// @namespace https://github.com/Charcoal-SE/
// @description Adds Smokey status of a post and feedback options to flag dialogs.
// @author ArtOfCode
// @contributor angussidney
// @contributor rene
// @attribution Brock Adams (https://github.com/BrockA)
// @version 1.14.0
// @updateURL https://raw.githubusercontent.com/Charcoal-SE/Userscripts/master/fdsc/fdsc.meta.js
// @downloadURL https://raw.githubusercontent.com/Charcoal-SE/Userscripts/master/fdsc/fdsc.user.js
// @supportURL https://github.com/Charcoal-SE/Userscripts/issues
// @match *://*.stackexchange.com/*
// @match *://*.stackoverflow.com/*
// @match *://*.superuser.com/*
// @match *://*.serverfault.com/*
// @match *://*.askubuntu.com/*
// @match *://*.stackapps.com/*
// @match *://*.mathoverflow.net/*
// @exclude *://chat.stackexchange.com/*
// @exclude *://chat.meta.stackexchange.com/*
// @exclude *://chat.stackoverflow.com/*
// @exclude *://blog.stackoverflow.com/*
// @exclude *://*.area51.stackexchange.com/*
// @require https://cdn.rawgit.com/ofirdagan/cross-domain-local-storage/d779a81a6383475a1bf88595a98b10a8bd5bb4ae/dist/scripts/xdLocalStorage.min.js
// @grant none
// ==/UserScript==
15 changes: 15 additions & 0 deletions fire/fire.meta.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// ==UserScript==
// @name Flag Instantly, Rapidly, Effortlessly
// @namespace https://github.com/Charcoal-SE/
// @description FIRE adds a button to SmokeDetector reports that allows you to provide feedback & flag, all from chat.
// @author Cerbrus
// @attribution Michiel Dommerholt (https://github.com/Cerbrus)
// @version 0.9.11
// @updateURL https://raw.githubusercontent.com/Charcoal-SE/Userscripts/master/fire/fire.meta.js
// @downloadURL https://raw.githubusercontent.com/Charcoal-SE/Userscripts/master/fire/fire.user.js
// @supportURL https://github.com/Charcoal-SE/Userscripts/issues
// @match *://chat.stackexchange.com/rooms/11540/charcoal-hq*
// @match *://chat.stackoverflow.com/rooms/41570/so-close-vote-reviewers*
// @match *://chat.meta.stackexchange.com/rooms/89/tavern-on-the-meta*
// @grant none
// ==/UserScript==
15 changes: 15 additions & 0 deletions gas-mask-se/gas-mask-se.meta.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// ==UserScript==
// @name Unofficial Stack Exchange gas mask
// @description A mission-critical tool when exploring the deepest depths of Stack Exchange.
// @description Automatically hides images from new users.
// @run-at document-start
// @grant none
// @include *://*stackexchange.com/*
// @include *://*stackoverflow.com/*
// @include *://*mathoverflow.com/*
// @include *://*serverfault.com/*
// @include *://*superuser.com/*
// @include *://*stackapps.com/*
// @include *://*askubuntu.com/*
// @version 1.3
// ==/UserScript==
18 changes: 18 additions & 0 deletions hideads/hideads.meta.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// ==UserScript==
// @name Hide ads
// @description Hides advertisements so that the flag link doesn't jump while loading the page
// @match *://*.stackexchange.com/*
// @match *://*.stackoverflow.com/*
// @match *://*.superuser.com/*
// @match *://*.serverfault.com/*
// @match *://*.askubuntu.com/*
// @match *://*.stackapps.com/*
// @match *://*.mathoverflow.net/*
// @exclude *://chat.stackexchange.com/*
// @exclude *://chat.meta.stackexchange.com/*
// @exclude *://chat.stackoverflow.com/*
// @exclude *://blog.stackoverflow.com/*
// @exclude *://*.area51.stackexchange.com/*
// @version 1
// @grant none
// ==/UserScript==
9 changes: 9 additions & 0 deletions ms-dark-theme/ms_dark_theme.meta.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// ==UserScript==
// @name Dark themed metasmoke
// @description Enables the dark theme in production mode on metasmoke
// @author ArtOfCode
// @version 0.1.0
// @match *://metasmoke.erwaysoftware.com/*
// @match *://metasmoke.charcoal-se.org/*
// @grant none
// ==/UserScript==

0 comments on commit 522e8e6

Please sign in to comment.