diff --git a/.eslintrc.json b/.eslintrc.json new file mode 100644 index 0000000000..cbcea998b0 --- /dev/null +++ b/.eslintrc.json @@ -0,0 +1,317 @@ +{ + "env": { + "browser": true, + "commonjs": true, + "node": true + }, + "extends": [ + "eslint:recommended" + ], + "globals": { + "$tw": "writable" + }, + "parserOptions": { + "ecmaVersion": 5 + }, + "plugins": [], + "rules": { + "array-bracket-newline": "off", + "array-bracket-spacing": "off", + "array-callback-return": "off", + "array-element-newline": "off", + "arrow-body-style": "error", + "arrow-parens": [ + "error", + "as-needed" + ], + "arrow-spacing": [ + "error", + { + "after": true, + "before": true + } + ], + "block-scoped-var": "off", + "block-spacing": "off", + "brace-style": "off", + "callback-return": "off", + "camelcase": "off", + "capitalized-comments": "off", + "class-methods-use-this": "error", + "comma-dangle": "off", + "comma-spacing": "off", + "comma-style": "off", + "complexity": "off", + "computed-property-spacing": "off", + "consistent-return": "off", + "consistent-this": "off", + "curly": "off", + "default-case": "off", + "default-case-last": "error", + "default-param-last": "error", + "dot-location": "off", + "dot-notation": "off", + "eol-last": "off", + "eqeqeq": "off", + "func-call-spacing": "off", + "func-name-matching": "off", + "func-names": "off", + "func-style": "off", + "function-call-argument-newline": "off", + "function-paren-newline": "off", + "generator-star-spacing": "error", + "global-require": "off", + "grouped-accessor-pairs": "error", + "guard-for-in": "off", + "handle-callback-err": "off", + "id-blacklist": "error", + "id-denylist": "error", + "id-length": "off", + "id-match": "error", + "implicit-arrow-linebreak": "error", + "indent": "off", + "indent-legacy": "off", + "init-declarations": "off", + "jsx-quotes": "error", + "key-spacing": "off", + "keyword-spacing": [ + "error", + { + "before": true, + "after": false, + "overrides": { + "case": { + "after": true + }, + "do": { + "after": true + }, + "else": { + "after": true + }, + "return": { + "after": true + }, + "throw": { + "after": true + }, + "try": { + "after": true + }, + "catch": { + "after": true + } + } + } + ], + "line-comment-position": "off", + "linebreak-style": "off", + "lines-around-comment": "off", + "lines-around-directive": "off", + "lines-between-class-members": "error", + "max-classes-per-file": "error", + "max-depth": "off", + "max-len": "off", + "max-lines": "off", + "max-lines-per-function": "off", + "max-nested-callbacks": "error", + "max-params": "off", + "max-statements": "off", + "max-statements-per-line": "off", + "multiline-comment-style": "off", + "multiline-ternary": "off", + "new-parens": "off", + "newline-after-var": "off", + "newline-before-return": "off", + "newline-per-chained-call": "off", + "no-alert": "off", + "no-array-constructor": "off", + "no-await-in-loop": "error", + "no-bitwise": "off", + "no-buffer-constructor": "off", + "no-caller": "error", + "no-catch-shadow": "off", + "no-confusing-arrow": "error", + "no-console": "off", + "no-constant-condition": [ + "error", + { + "checkLoops": false + } + ], + "no-constructor-return": "error", + "no-continue": "off", + "no-div-regex": "off", + "no-duplicate-imports": "error", + "no-else-return": "off", + "no-empty-function": "off", + "no-eq-null": "off", + "no-eval": "off", + "no-extend-native": "off", + "no-extra-bind": "off", + "no-extra-label": "off", + "no-extra-parens": "off", + "no-floating-decimal": "off", + "no-implicit-coercion": [ + "error", + { + "boolean": false, + "number": false, + "string": false + } + ], + "no-implicit-globals": "off", + "no-implied-eval": "error", + "no-inline-comments": "off", + "no-invalid-this": "off", + "no-iterator": "error", + "no-label-var": "off", + "no-labels": "off", + "no-lone-blocks": "off", + "no-lonely-if": "off", + "no-loop-func": "off", + "no-loss-of-precision": "error", + "no-magic-numbers": "off", + "no-mixed-operators": "off", + "no-mixed-requires": "off", + "no-multi-assign": "off", + "no-multi-spaces": "off", + "no-multi-str": "error", + "no-multiple-empty-lines": ["warn", { "max": 4, "maxEOF": 0 }], + "no-native-reassign": "off", + "no-negated-condition": "off", + "no-negated-in-lhs": "error", + "no-nested-ternary": "off", + "no-new": "off", + "no-new-func": "off", + "no-new-object": "off", + "no-new-require": "error", + "no-new-wrappers": "error", + "no-octal-escape": "error", + "no-param-reassign": "off", + "no-path-concat": "error", + "no-plusplus": "off", + "no-process-env": "off", + "no-process-exit": "off", + "no-promise-executor-return": "error", + "no-proto": "off", + "no-restricted-exports": "error", + "no-restricted-globals": "error", + "no-restricted-imports": "error", + "no-restricted-modules": "error", + "no-restricted-properties": "error", + "no-restricted-syntax": "error", + "no-return-assign": "off", + "no-return-await": "error", + "no-script-url": "off", + "no-self-compare": "off", + "no-sequences": "off", + "no-shadow": "off", + "no-spaced-func": "off", + "no-sync": "off", + "no-tabs": "off", + "no-template-curly-in-string": "error", + "no-ternary": "off", + "no-throw-literal": "off", + "no-trailing-spaces": "error", + "no-undef-init": "off", + "no-undefined": "off", + "no-underscore-dangle": "off", + "no-unmodified-loop-condition": "off", + "no-unneeded-ternary": "off", + "no-unreachable-loop": "error", + "no-unused-expressions": "off", + "no-use-before-define": "off", + "no-useless-backreference": "error", + "no-useless-call": "off", + "no-useless-computed-key": "error", + "no-useless-concat": "off", + "no-useless-constructor": "error", + "no-useless-rename": "error", + "no-useless-return": "off", + "no-var": "off", + "no-void": "off", + "no-warning-comments": "off", + "no-whitespace-before-property": "error", + "nonblock-statement-body-position": [ + "error", + "any" + ], + "object-curly-newline": "off", + "object-curly-spacing": "off", + "object-property-newline": "off", + "object-shorthand": "off", + "one-var": "off", + "one-var-declaration-per-line": "off", + "operator-assignment": "off", + "operator-linebreak": "off", + "padded-blocks": "off", + "padding-line-between-statements": "error", + "prefer-arrow-callback": "off", + "prefer-const": "off", + "prefer-destructuring": "off", + "prefer-exponentiation-operator": "off", + "prefer-named-capture-group": "off", + "prefer-numeric-literals": "error", + "prefer-object-spread": "off", + "prefer-promise-reject-errors": "error", + "prefer-reflect": "off", + "prefer-regex-literals": "off", + "prefer-rest-params": "off", + "prefer-spread": "off", + "prefer-template": "off", + "quote-props": "off", + "quotes": "off", + "radix": "off", + "require-atomic-updates": "error", + "require-await": "error", + "require-jsdoc": "off", + "require-unicode-regexp": "off", + "rest-spread-spacing": "error", + "semi": "off", + "semi-spacing": "off", + "semi-style": "off", + "sort-imports": "error", + "sort-keys": "off", + "sort-vars": "off", + "space-before-blocks": "off", + "space-before-function-paren": "off", + "space-in-parens": "off", + "space-infix-ops": "off", + "space-unary-ops": "off", + "spaced-comment": "off", + "strict": "off", + "switch-colon-spacing": "off", + "symbol-description": "error", + "template-curly-spacing": "error", + "template-tag-spacing": "error", + "unicode-bom": [ + "error", + "never" + ], + "valid-jsdoc": "off", + "valid-typeof": [ + "error", + { + "requireStringLiterals": false + } + ], + "vars-on-top": "off", + "wrap-iife": "off", + "wrap-regex": "off", + "yield-star-spacing": "error", + "yoda": "off", + "no-useless-escape": "off", + "no-unused-vars": "off", + "no-empty": "off", + "no-extra-semi": "off", + "no-redeclare": "off", + "no-control-regex": "off", + "no-mixed-spaces-and-tabs": "off", + "no-extra-boolean-cast": "off", + "no-prototype-builtins": "off", + "no-undef": "off", + "no-unreachable": "off", + "no-self-assign": "off" + } +} diff --git a/core/modules/commander.js b/core/modules/commander.js index b55679a2e8..b73e39b0f6 100644 --- a/core/modules/commander.js +++ b/core/modules/commander.js @@ -6,10 +6,7 @@ module-type: global The $tw.Commander class is a command interpreter \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; /* @@ -173,5 +170,3 @@ Commander.initCommands = function(moduleType) { }; exports.Commander = Commander; - -})(); diff --git a/core/modules/commands/build.js b/core/modules/commands/build.js index 60456372dc..cbb7663f18 100644 --- a/core/modules/commands/build.js +++ b/core/modules/commands/build.js @@ -6,10 +6,7 @@ module-type: command Command to build a build target \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; exports.info = { @@ -48,5 +45,3 @@ Command.prototype.execute = function() { }; exports.Command = Command; - -})(); diff --git a/core/modules/commands/clearpassword.js b/core/modules/commands/clearpassword.js index 9f714a3ef6..915c60d234 100644 --- a/core/modules/commands/clearpassword.js +++ b/core/modules/commands/clearpassword.js @@ -6,10 +6,7 @@ module-type: command Clear password for crypto operations \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; exports.info = { @@ -29,5 +26,3 @@ Command.prototype.execute = function() { }; exports.Command = Command; - -})(); diff --git a/core/modules/commands/commands.js b/core/modules/commands/commands.js index 813f190644..ddaa387db0 100644 --- a/core/modules/commands/commands.js +++ b/core/modules/commands/commands.js @@ -7,10 +7,6 @@ Runs the commands returned from a filter \*/ -(function() { - -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; exports.info = { @@ -38,5 +34,3 @@ Command.prototype.execute = function() { }; exports.Command = Command; - -})(); diff --git a/core/modules/commands/deletetiddlers.js b/core/modules/commands/deletetiddlers.js index 3d8b855d9e..797a6428a4 100644 --- a/core/modules/commands/deletetiddlers.js +++ b/core/modules/commands/deletetiddlers.js @@ -6,10 +6,7 @@ module-type: command Command to delete tiddlers \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; exports.info = { @@ -38,5 +35,3 @@ Command.prototype.execute = function() { }; exports.Command = Command; - -})(); diff --git a/core/modules/commands/editions.js b/core/modules/commands/editions.js index cc802b9f5d..c46489d095 100644 --- a/core/modules/commands/editions.js +++ b/core/modules/commands/editions.js @@ -6,10 +6,7 @@ module-type: command Command to list the available editions \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; exports.info = { @@ -35,5 +32,3 @@ Command.prototype.execute = function() { }; exports.Command = Command; - -})(); diff --git a/core/modules/commands/fetch.js b/core/modules/commands/fetch.js index 07cda691c8..be076eb3c9 100644 --- a/core/modules/commands/fetch.js +++ b/core/modules/commands/fetch.js @@ -6,10 +6,7 @@ module-type: command Commands to fetch external tiddlers \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; exports.info = { @@ -171,5 +168,3 @@ Command.prototype.processBody = function(body,type,options,url) { }; exports.Command = Command; - -})(); diff --git a/core/modules/commands/help.js b/core/modules/commands/help.js index 90c1908291..861c8f6d8b 100644 --- a/core/modules/commands/help.js +++ b/core/modules/commands/help.js @@ -6,10 +6,7 @@ module-type: command Help command \*/ -(function(){ -/*jshint node: true, browser: true */ -/*global $tw: false */ "use strict"; exports.info = { @@ -37,5 +34,3 @@ Command.prototype.execute = function() { }; exports.Command = Command; - -})(); diff --git a/core/modules/commands/import.js b/core/modules/commands/import.js index 9465c3da1c..7c7b6740d3 100644 --- a/core/modules/commands/import.js +++ b/core/modules/commands/import.js @@ -6,10 +6,7 @@ module-type: command Command to import tiddlers from a file \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; exports.info = { @@ -44,5 +41,3 @@ Command.prototype.execute = function() { }; exports.Command = Command; - -})(); diff --git a/core/modules/commands/init.js b/core/modules/commands/init.js index 2d053ae3c7..ed48a54941 100644 --- a/core/modules/commands/init.js +++ b/core/modules/commands/init.js @@ -6,10 +6,7 @@ module-type: command Command to initialise an empty wiki folder \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; exports.info = { @@ -55,5 +52,3 @@ Command.prototype.execute = function() { }; exports.Command = Command; - -})(); diff --git a/core/modules/commands/listen.js b/core/modules/commands/listen.js index ca6e6e0765..80cb182936 100644 --- a/core/modules/commands/listen.js +++ b/core/modules/commands/listen.js @@ -6,10 +6,7 @@ module-type: command Listen for HTTP requests and serve tiddlers \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; var Server = require("$:/core/modules/server/server.js").Server; @@ -44,5 +41,3 @@ Command.prototype.execute = function() { }; exports.Command = Command; - -})(); diff --git a/core/modules/commands/load.js b/core/modules/commands/load.js index 8fd9cba104..e19ecd59ac 100644 --- a/core/modules/commands/load.js +++ b/core/modules/commands/load.js @@ -6,10 +6,7 @@ module-type: command Command to load tiddlers from a file or directory \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; exports.info = { @@ -47,5 +44,3 @@ Command.prototype.execute = function() { }; exports.Command = Command; - -})(); diff --git a/core/modules/commands/makelibrary.js b/core/modules/commands/makelibrary.js index 3af2e49433..b8ad2e5b63 100644 --- a/core/modules/commands/makelibrary.js +++ b/core/modules/commands/makelibrary.js @@ -6,10 +6,7 @@ module-type: command Command to pack all of the plugins in the library into a plugin tiddler of type "library" \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; exports.info = { @@ -41,5 +38,3 @@ Command.prototype.execute = function() { }; exports.Command = Command; - -})(); diff --git a/core/modules/commands/output.js b/core/modules/commands/output.js index 0532f58d76..d43eb2596f 100644 --- a/core/modules/commands/output.js +++ b/core/modules/commands/output.js @@ -6,10 +6,7 @@ module-type: command Command to set the default output location (defaults to current working directory) \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; exports.info = { @@ -34,5 +31,3 @@ Command.prototype.execute = function() { }; exports.Command = Command; - -})(); diff --git a/core/modules/commands/password.js b/core/modules/commands/password.js index 85d53fa33d..27139a9ed0 100644 --- a/core/modules/commands/password.js +++ b/core/modules/commands/password.js @@ -6,10 +6,7 @@ module-type: command Save password for crypto operations \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; exports.info = { @@ -32,5 +29,3 @@ Command.prototype.execute = function() { }; exports.Command = Command; - -})(); diff --git a/core/modules/commands/render.js b/core/modules/commands/render.js index bd8b23171a..c85feda92a 100644 --- a/core/modules/commands/render.js +++ b/core/modules/commands/render.js @@ -6,10 +6,7 @@ module-type: command Render individual tiddlers and save the results to the specified files \*/ -(function(){ - /*jslint node: true, browser: true */ - /*global $tw: false */ "use strict"; var widget = require("$:/core/modules/widgets/widget.js"); @@ -66,6 +63,3 @@ Render individual tiddlers and save the results to the specified files }; exports.Command = Command; - - })(); - \ No newline at end of file diff --git a/core/modules/commands/rendertiddler.js b/core/modules/commands/rendertiddler.js index 41812aea14..2a996c8c16 100755 --- a/core/modules/commands/rendertiddler.js +++ b/core/modules/commands/rendertiddler.js @@ -6,10 +6,7 @@ module-type: command Command to render a tiddler and save it to a file \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; exports.info = { @@ -53,5 +50,3 @@ Command.prototype.execute = function() { }; exports.Command = Command; - -})(); diff --git a/core/modules/commands/rendertiddlers.js b/core/modules/commands/rendertiddlers.js index 78272cc33c..f392ba7046 100644 --- a/core/modules/commands/rendertiddlers.js +++ b/core/modules/commands/rendertiddlers.js @@ -6,10 +6,7 @@ module-type: command Command to render several tiddlers to a folder of files \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; var widget = require("$:/core/modules/widgets/widget.js"); @@ -65,5 +62,3 @@ Command.prototype.execute = function() { }; exports.Command = Command; - -})(); diff --git a/core/modules/commands/save.js b/core/modules/commands/save.js index 3cb7ef08c6..1d9155623e 100644 --- a/core/modules/commands/save.js +++ b/core/modules/commands/save.js @@ -6,10 +6,7 @@ module-type: command Saves individual tiddlers in their raw text or binary format to the specified files \*/ -(function(){ - /*jslint node: true, browser: true */ - /*global $tw: false */ "use strict"; exports.info = { @@ -64,6 +61,3 @@ Saves individual tiddlers in their raw text or binary format to the specified fi }; exports.Command = Command; - - })(); - \ No newline at end of file diff --git a/core/modules/commands/savelibrarytiddlers.js b/core/modules/commands/savelibrarytiddlers.js index af42d7c8a8..431960edd4 100644 --- a/core/modules/commands/savelibrarytiddlers.js +++ b/core/modules/commands/savelibrarytiddlers.js @@ -16,10 +16,7 @@ The pathname specifies the pathname to the folder in which the JSON files should The skinnylisting specifies the title of the tiddler to which a JSON catalogue of the subtiddlers will be saved. The JSON file contains the same data as the bundle tiddler but with the `text` field removed. \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; exports.info = { @@ -94,5 +91,3 @@ Command.prototype.execute = function() { }; exports.Command = Command; - -})(); diff --git a/core/modules/commands/savetiddler.js b/core/modules/commands/savetiddler.js index efc484ec7b..492fe9f124 100644 --- a/core/modules/commands/savetiddler.js +++ b/core/modules/commands/savetiddler.js @@ -6,10 +6,7 @@ module-type: command Command to save the content of a tiddler to a file \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; exports.info = { @@ -47,5 +44,3 @@ Command.prototype.execute = function() { }; exports.Command = Command; - -})(); diff --git a/core/modules/commands/savetiddlers.js b/core/modules/commands/savetiddlers.js index 9c750e2049..0e15d5edca 100644 --- a/core/modules/commands/savetiddlers.js +++ b/core/modules/commands/savetiddlers.js @@ -6,10 +6,7 @@ module-type: command Command to save several tiddlers to a folder of files \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; var widget = require("$:/core/modules/widgets/widget.js"); @@ -52,5 +49,3 @@ Command.prototype.execute = function() { }; exports.Command = Command; - -})(); diff --git a/core/modules/commands/savewikifolder.js b/core/modules/commands/savewikifolder.js index 461ff6f049..751e0e54ea 100644 --- a/core/modules/commands/savewikifolder.js +++ b/core/modules/commands/savewikifolder.js @@ -15,10 +15,7 @@ The following options are supported: Supports backward compatibility with --savewikifolder [] [ [=] ]* \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; exports.info = { @@ -221,5 +218,3 @@ WikiFolderMaker.prototype.saveFile = function(filename,encoding,data) { }; exports.Command = Command; - -})(); diff --git a/core/modules/commands/server.js b/core/modules/commands/server.js index 507d1281d9..d1ee487a2a 100644 --- a/core/modules/commands/server.js +++ b/core/modules/commands/server.js @@ -6,10 +6,7 @@ module-type: command Deprecated legacy command for serving tiddlers \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; var Server = require("$:/core/modules/server/server.js").Server; @@ -51,5 +48,3 @@ Command.prototype.execute = function() { }; exports.Command = Command; - -})(); diff --git a/core/modules/commands/setfield.js b/core/modules/commands/setfield.js index 3f8ec1d14f..7be8cbdca8 100644 --- a/core/modules/commands/setfield.js +++ b/core/modules/commands/setfield.js @@ -6,10 +6,7 @@ module-type: command Command to modify selected tiddlers to set a field to the text of a template tiddler that has been wikified with the selected tiddler as the current tiddler. \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; var widget = require("$:/core/modules/widgets/widget.js"); @@ -54,5 +51,3 @@ Command.prototype.execute = function() { }; exports.Command = Command; - -})(); diff --git a/core/modules/commands/unpackplugin.js b/core/modules/commands/unpackplugin.js index 6f85c066f5..5e2bd33c06 100644 --- a/core/modules/commands/unpackplugin.js +++ b/core/modules/commands/unpackplugin.js @@ -6,10 +6,7 @@ module-type: command Command to extract the shadow tiddlers from within a plugin \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; exports.info = { @@ -40,5 +37,3 @@ Command.prototype.execute = function() { }; exports.Command = Command; - -})(); diff --git a/core/modules/commands/verbose.js b/core/modules/commands/verbose.js index 6b01178292..23b5303c7f 100644 --- a/core/modules/commands/verbose.js +++ b/core/modules/commands/verbose.js @@ -6,10 +6,7 @@ module-type: command Verbose command \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; exports.info = { @@ -30,5 +27,3 @@ Command.prototype.execute = function() { }; exports.Command = Command; - -})(); diff --git a/core/modules/commands/version.js b/core/modules/commands/version.js index 24edc97f79..e14c635de2 100644 --- a/core/modules/commands/version.js +++ b/core/modules/commands/version.js @@ -6,10 +6,7 @@ module-type: command Version command \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; exports.info = { @@ -28,5 +25,3 @@ Command.prototype.execute = function() { }; exports.Command = Command; - -})(); diff --git a/core/modules/config.js b/core/modules/config.js index fdcf94d0fe..3546a21bc1 100644 --- a/core/modules/config.js +++ b/core/modules/config.js @@ -6,10 +6,7 @@ module-type: config Core configuration constants \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; exports.preferences = {}; @@ -37,5 +34,3 @@ exports.htmlVoidElements = "area,base,br,col,command,embed,hr,img,input,keygen,l exports.htmlBlockElements = "address,article,aside,audio,blockquote,canvas,dd,details,div,dl,dt,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,li,nav,ol,p,pre,section,summary,table,tfoot,ul,video".split(","); exports.htmlUnsafeElements = "script".split(","); - -})(); diff --git a/core/modules/deserializers.js b/core/modules/deserializers.js index bff4aaea16..972a41bb0b 100644 --- a/core/modules/deserializers.js +++ b/core/modules/deserializers.js @@ -6,10 +6,7 @@ module-type: tiddlerdeserializer Functions to deserialise tiddlers from a block of text \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; exports["application/x-tiddler-html-div"] = function(text,fields) { @@ -181,5 +178,3 @@ var deserializeTiddlerDiv = function(text /* [,fields] */) { } return undefined; }; - -})(); diff --git a/core/modules/editor/engines/framed.js b/core/modules/editor/engines/framed.js index 34d11dec7c..9b1c8cd81f 100644 --- a/core/modules/editor/engines/framed.js +++ b/core/modules/editor/engines/framed.js @@ -6,10 +6,7 @@ module-type: library Text editor engine based on a simple input or textarea within an iframe. This is done so that the selection is preserved even when clicking away from the textarea \*/ -(function(){ -/*jslint node: true,browser: true */ -/*global $tw: false */ "use strict"; var HEIGHT_VALUE_TITLE = "$:/config/TextEditor/EditorHeight/Height"; @@ -273,5 +270,3 @@ FramedEngine.prototype.executeTextOperation = function(operation) { }; exports.FramedEngine = FramedEngine; - -})(); diff --git a/core/modules/editor/engines/simple.js b/core/modules/editor/engines/simple.js index 809dc58ea9..93f0215222 100644 --- a/core/modules/editor/engines/simple.js +++ b/core/modules/editor/engines/simple.js @@ -6,10 +6,7 @@ module-type: library Text editor engine based on a simple input or textarea tag \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; var HEIGHT_VALUE_TITLE = "$:/config/TextEditor/EditorHeight/Height"; @@ -172,5 +169,3 @@ SimpleEngine.prototype.executeTextOperation = function(operation) { }; exports.SimpleEngine = SimpleEngine; - -})(); diff --git a/core/modules/editor/factory.js b/core/modules/editor/factory.js index 6157ec67fd..984cc76bad 100644 --- a/core/modules/editor/factory.js +++ b/core/modules/editor/factory.js @@ -6,10 +6,7 @@ module-type: library Factory for constructing text editor widgets with specified engines for the toolbar and non-toolbar cases \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; var DEFAULT_MIN_TEXT_AREA_HEIGHT = "100px"; // Minimum height of textareas in pixels @@ -386,5 +383,3 @@ function editTextWidgetFactory(toolbarEngine,nonToolbarEngine) { } exports.editTextWidgetFactory = editTextWidgetFactory; - -})(); diff --git a/core/modules/editor/operations/bitmap/clear.js b/core/modules/editor/operations/bitmap/clear.js index cb86b43a12..48d5772d5a 100644 --- a/core/modules/editor/operations/bitmap/clear.js +++ b/core/modules/editor/operations/bitmap/clear.js @@ -6,10 +6,7 @@ module-type: bitmapeditoroperation Bitmap editor operation to clear the image \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; exports["clear"] = function(event) { @@ -20,5 +17,3 @@ exports["clear"] = function(event) { // Save changes this.strokeEnd(); }; - -})(); diff --git a/core/modules/editor/operations/bitmap/resize.js b/core/modules/editor/operations/bitmap/resize.js index 12059a5cbc..683cfa11aa 100644 --- a/core/modules/editor/operations/bitmap/resize.js +++ b/core/modules/editor/operations/bitmap/resize.js @@ -6,10 +6,7 @@ module-type: bitmapeditoroperation Bitmap editor operation to resize the image \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; exports["resize"] = function(event) { @@ -25,5 +22,3 @@ exports["resize"] = function(event) { // Save the image into the tiddler this.saveChanges(); }; - -})(); diff --git a/core/modules/editor/operations/bitmap/rotate-left.js b/core/modules/editor/operations/bitmap/rotate-left.js index 6e1b15d3e2..25aa77300d 100644 --- a/core/modules/editor/operations/bitmap/rotate-left.js +++ b/core/modules/editor/operations/bitmap/rotate-left.js @@ -6,10 +6,7 @@ module-type: bitmapeditoroperation Bitmap editor operation to rotate the image left by 90 degrees \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; exports["rotate-left"] = function(event) { @@ -20,5 +17,3 @@ exports["rotate-left"] = function(event) { // Save the image into the tiddler this.saveChanges(); }; - -})(); diff --git a/core/modules/editor/operations/text/excise.js b/core/modules/editor/operations/text/excise.js index 0753705c59..c0920cf096 100644 --- a/core/modules/editor/operations/text/excise.js +++ b/core/modules/editor/operations/text/excise.js @@ -6,10 +6,7 @@ module-type: texteditoroperation Text editor operation to excise the selection to a new tiddler \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; function isMarkdown(mediaType) { @@ -53,5 +50,3 @@ exports["excise"] = function(event,operation) { operation.newSelStart = operation.selStart; operation.newSelEnd = operation.selStart + operation.replacement.length; }; - -})(); diff --git a/core/modules/editor/operations/text/focus-editor.js b/core/modules/editor/operations/text/focus-editor.js index 0b36f731cb..19e4a8997d 100644 --- a/core/modules/editor/operations/text/focus-editor.js +++ b/core/modules/editor/operations/text/focus-editor.js @@ -4,14 +4,9 @@ type: application/javascript module-type: texteditoroperation Simply focus the Text editor \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; exports["focus-editor"] = function(event,operation) { operation = null; }; - -})(); \ No newline at end of file diff --git a/core/modules/editor/operations/text/insert-text.js b/core/modules/editor/operations/text/insert-text.js index 7847149685..0e24d7413d 100644 --- a/core/modules/editor/operations/text/insert-text.js +++ b/core/modules/editor/operations/text/insert-text.js @@ -6,10 +6,7 @@ module-type: texteditoroperation Text editor operation insert text at the caret position. If there is a selection it is replaced. \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; exports["insert-text"] = function(event,operation) { @@ -19,5 +16,3 @@ exports["insert-text"] = function(event,operation) { operation.newSelStart = operation.selStart + operation.replacement.length; operation.newSelEnd = operation.newSelStart; }; - -})(); diff --git a/core/modules/editor/operations/text/make-link.js b/core/modules/editor/operations/text/make-link.js index e8caf21c53..ca11f34c62 100644 --- a/core/modules/editor/operations/text/make-link.js +++ b/core/modules/editor/operations/text/make-link.js @@ -6,10 +6,7 @@ module-type: texteditoroperation Text editor operation to make a link \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; exports["make-link"] = function(event,operation) { @@ -25,5 +22,3 @@ exports["make-link"] = function(event,operation) { operation.newSelStart = operation.selStart + operation.replacement.length; operation.newSelEnd = operation.newSelStart; }; - -})(); diff --git a/core/modules/editor/operations/text/prefix-lines.js b/core/modules/editor/operations/text/prefix-lines.js index 0a005c96f6..0f3412b678 100644 --- a/core/modules/editor/operations/text/prefix-lines.js +++ b/core/modules/editor/operations/text/prefix-lines.js @@ -6,10 +6,7 @@ module-type: texteditoroperation Text editor operation to add a prefix to the selected lines \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; exports["prefix-lines"] = function(event,operation) { @@ -51,5 +48,3 @@ exports["prefix-lines"] = function(event,operation) { operation.newSelEnd = operation.newSelStart + operation.replacement.length; } }; - -})(); diff --git a/core/modules/editor/operations/text/replace-all.js b/core/modules/editor/operations/text/replace-all.js index fc1541935f..f6fe0b24cb 100644 --- a/core/modules/editor/operations/text/replace-all.js +++ b/core/modules/editor/operations/text/replace-all.js @@ -6,10 +6,7 @@ module-type: texteditoroperation Text editor operation to replace the entire text \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; exports["replace-all"] = function(event,operation) { @@ -19,5 +16,3 @@ exports["replace-all"] = function(event,operation) { operation.newSelStart = 0; operation.newSelEnd = operation.replacement.length; }; - -})(); diff --git a/core/modules/editor/operations/text/replace-selection.js b/core/modules/editor/operations/text/replace-selection.js index 740a41fb19..24ef9c70f7 100644 --- a/core/modules/editor/operations/text/replace-selection.js +++ b/core/modules/editor/operations/text/replace-selection.js @@ -6,10 +6,7 @@ module-type: texteditoroperation Text editor operation to replace the selection \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; exports["replace-selection"] = function(event,operation) { @@ -19,5 +16,3 @@ exports["replace-selection"] = function(event,operation) { operation.newSelStart = operation.selStart; operation.newSelEnd = operation.selStart + operation.replacement.length; }; - -})(); diff --git a/core/modules/editor/operations/text/save-selection.js b/core/modules/editor/operations/text/save-selection.js index 484e6ff3c8..00b7174b69 100644 --- a/core/modules/editor/operations/text/save-selection.js +++ b/core/modules/editor/operations/text/save-selection.js @@ -6,10 +6,7 @@ module-type: texteditoroperation Text editor operation to save the current selection in a specified tiddler \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; exports["save-selection"] = function(event,operation) { @@ -19,5 +16,3 @@ exports["save-selection"] = function(event,operation) { this.wiki.setText(tiddler,field,null,operation.text.substring(operation.selStart,operation.selEnd)); } }; - -})(); diff --git a/core/modules/editor/operations/text/wrap-lines.js b/core/modules/editor/operations/text/wrap-lines.js index 2e4f229430..9e85d50ca1 100644 --- a/core/modules/editor/operations/text/wrap-lines.js +++ b/core/modules/editor/operations/text/wrap-lines.js @@ -6,10 +6,7 @@ module-type: texteditoroperation Text editor operation to wrap the selected lines with a prefix and suffix \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; exports["wrap-lines"] = function(event,operation) { @@ -43,5 +40,3 @@ exports["wrap-lines"] = function(event,operation) { operation.newSelEnd = operation.newSelStart + (operation.cutEnd - operation.cutStart); } }; - -})(); diff --git a/core/modules/editor/operations/text/wrap-selection.js b/core/modules/editor/operations/text/wrap-selection.js index 665d72eb45..4fb463b740 100644 --- a/core/modules/editor/operations/text/wrap-selection.js +++ b/core/modules/editor/operations/text/wrap-selection.js @@ -6,10 +6,7 @@ module-type: texteditoroperation Text editor operation to wrap the selection with the specified prefix and suffix \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; exports["wrap-selection"] = function(event,operation) { @@ -134,5 +131,3 @@ exports["wrap-selection"] = function(event,operation) { addPrefixSuffix(); } }; - -})(); diff --git a/core/modules/filterrunprefixes/all.js b/core/modules/filterrunprefixes/all.js index 652936de01..7d57ce408f 100644 --- a/core/modules/filterrunprefixes/all.js +++ b/core/modules/filterrunprefixes/all.js @@ -7,10 +7,7 @@ Union of sets without de-duplication. Equivalent to = filter run prefix. \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; /* @@ -21,5 +18,3 @@ exports.all = function(operationSubFunction) { results.push.apply(results, operationSubFunction(source,widget)); }; }; - -})(); diff --git a/core/modules/filterrunprefixes/and.js b/core/modules/filterrunprefixes/and.js index 309c228e67..c394b243e1 100644 --- a/core/modules/filterrunprefixes/and.js +++ b/core/modules/filterrunprefixes/and.js @@ -7,10 +7,7 @@ Intersection of sets. Equivalent to + filter run prefix. \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; /* @@ -24,5 +21,3 @@ exports.and = function(operationSubFunction,options) { results.pushTop(operationSubFunction(source,widget)); }; }; - -})(); diff --git a/core/modules/filterrunprefixes/cascade.js b/core/modules/filterrunprefixes/cascade.js index 486e75f456..98044579ce 100644 --- a/core/modules/filterrunprefixes/cascade.js +++ b/core/modules/filterrunprefixes/cascade.js @@ -3,10 +3,7 @@ title: $:/core/modules/filterrunprefixes/cascade.js type: application/javascript module-type: filterrunprefix \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; /* @@ -39,5 +36,3 @@ exports.cascade = function(operationSubFunction,options) { } } }; - -})(); \ No newline at end of file diff --git a/core/modules/filterrunprefixes/else.js b/core/modules/filterrunprefixes/else.js index 6e9ef29b3f..89635069c6 100644 --- a/core/modules/filterrunprefixes/else.js +++ b/core/modules/filterrunprefixes/else.js @@ -6,10 +6,7 @@ module-type: filterrunprefix Equivalent to ~ filter run prefix. \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; /* @@ -23,5 +20,3 @@ exports.else = function(operationSubFunction) { } }; }; - -})(); diff --git a/core/modules/filterrunprefixes/except.js b/core/modules/filterrunprefixes/except.js index 659f14228d..5ebed7feab 100644 --- a/core/modules/filterrunprefixes/except.js +++ b/core/modules/filterrunprefixes/except.js @@ -7,10 +7,7 @@ Difference of sets. Equivalent to - filter run prefix. \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; /* @@ -21,5 +18,3 @@ exports.except = function(operationSubFunction) { results.remove(operationSubFunction(source,widget)); }; }; - -})(); diff --git a/core/modules/filterrunprefixes/filter.js b/core/modules/filterrunprefixes/filter.js index 4ab0571095..0c6ed150f9 100644 --- a/core/modules/filterrunprefixes/filter.js +++ b/core/modules/filterrunprefixes/filter.js @@ -4,10 +4,7 @@ type: application/javascript module-type: filterrunprefix \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; /* @@ -35,5 +32,3 @@ exports.filter = function(operationSubFunction,options) { } } }; - -})(); diff --git a/core/modules/filterrunprefixes/intersection.js b/core/modules/filterrunprefixes/intersection.js index 34d36066fd..ce9ea45463 100644 --- a/core/modules/filterrunprefixes/intersection.js +++ b/core/modules/filterrunprefixes/intersection.js @@ -4,10 +4,7 @@ type: application/javascript module-type: filterrunprefix \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; /* @@ -27,5 +24,3 @@ exports.intersection = function(operationSubFunction) { } }; }; - -})(); diff --git a/core/modules/filterrunprefixes/map.js b/core/modules/filterrunprefixes/map.js index b756d6699c..c7f1ae5eb4 100644 --- a/core/modules/filterrunprefixes/map.js +++ b/core/modules/filterrunprefixes/map.js @@ -3,10 +3,7 @@ title: $:/core/modules/filterrunprefixes/map.js type: application/javascript module-type: filterrunprefix \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; /* @@ -40,5 +37,3 @@ exports.map = function(operationSubFunction,options) { } } }; - -})(); \ No newline at end of file diff --git a/core/modules/filterrunprefixes/or.js b/core/modules/filterrunprefixes/or.js index 82eff083a8..c4ffb20144 100644 --- a/core/modules/filterrunprefixes/or.js +++ b/core/modules/filterrunprefixes/or.js @@ -6,10 +6,7 @@ module-type: filterrunprefix Equivalent to a filter run with no prefix. \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; /* @@ -20,5 +17,3 @@ exports.or = function(operationSubFunction) { results.pushTop(operationSubFunction(source,widget)); }; }; - -})(); diff --git a/core/modules/filterrunprefixes/reduce.js b/core/modules/filterrunprefixes/reduce.js index ee2998837a..351d976bd9 100644 --- a/core/modules/filterrunprefixes/reduce.js +++ b/core/modules/filterrunprefixes/reduce.js @@ -3,10 +3,7 @@ title: $:/core/modules/filterrunprefixes/reduce.js type: application/javascript module-type: filterrunprefix \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; /* @@ -36,5 +33,3 @@ exports.reduce = function(operationSubFunction,options) { } } }; - -})(); diff --git a/core/modules/filterrunprefixes/sort.js b/core/modules/filterrunprefixes/sort.js index d8d3761261..126376887d 100644 --- a/core/modules/filterrunprefixes/sort.js +++ b/core/modules/filterrunprefixes/sort.js @@ -4,10 +4,7 @@ type: application/javascript module-type: filterrunprefix \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; /* @@ -48,5 +45,3 @@ exports.sort = function(operationSubFunction,options) { } } }; - -})(); \ No newline at end of file diff --git a/core/modules/filterrunprefixes/then.js b/core/modules/filterrunprefixes/then.js index 9f6d5c76a6..0f37fb37ff 100644 --- a/core/modules/filterrunprefixes/then.js +++ b/core/modules/filterrunprefixes/then.js @@ -6,10 +6,7 @@ module-type: filterrunprefix Replace results of previous runs unless empty \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; /* @@ -28,5 +25,3 @@ exports.then = function(operationSubFunction) { } }; }; - -})(); diff --git a/core/modules/filters.js b/core/modules/filters.js index aa82a352af..321f5a2114 100644 --- a/core/modules/filters.js +++ b/core/modules/filters.js @@ -6,10 +6,7 @@ module-type: wikimethod Adds tiddler filtering methods to the $tw.Wiki object. \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; var widgetClass = require("$:/core/modules/widgets/widget.js").widget; @@ -367,5 +364,3 @@ exports.compileFilter = function(filterString) { this.filterCacheCount++; return fnMeasured; }; - -})(); diff --git a/core/modules/filters/addprefix.js b/core/modules/filters/addprefix.js index d1f0a822b2..497af1f3bc 100644 --- a/core/modules/filters/addprefix.js +++ b/core/modules/filters/addprefix.js @@ -8,10 +8,7 @@ especially useful in contexts where only a filter expression is allowed and macro substitution isn't available. \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; /* @@ -24,5 +21,3 @@ exports.addprefix = function(source,operator,options) { }); return results; }; - -})(); diff --git a/core/modules/filters/addsuffix.js b/core/modules/filters/addsuffix.js index fb80c2573e..27ca659e96 100644 --- a/core/modules/filters/addsuffix.js +++ b/core/modules/filters/addsuffix.js @@ -8,10 +8,7 @@ especially useful in contexts where only a filter expression is allowed and macro substitution isn't available. \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; /* @@ -24,5 +21,3 @@ exports.addsuffix = function(source,operator,options) { }); return results; }; - -})(); diff --git a/core/modules/filters/after.js b/core/modules/filters/after.js index 6e5f3c77c8..9840a73fa4 100644 --- a/core/modules/filters/after.js +++ b/core/modules/filters/after.js @@ -6,10 +6,7 @@ module-type: filteroperator Filter operator returning the tiddler from the current list that is after the tiddler named in the operand. \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; /* @@ -27,5 +24,3 @@ exports.after = function(source,operator,options) { return [results[index + 1]]; } }; - -})(); diff --git a/core/modules/filters/all.js b/core/modules/filters/all.js index 3554a74b32..790afeca5d 100644 --- a/core/modules/filters/all.js +++ b/core/modules/filters/all.js @@ -8,10 +8,7 @@ Filter operator for selecting tiddlers [all[shadows+tiddlers]] \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; var allFilterOperators; @@ -54,5 +51,3 @@ exports.all = function(source,operator,options) { } return results.makeTiddlerIterator(options.wiki); }; - -})(); diff --git a/core/modules/filters/all/current.js b/core/modules/filters/all/current.js index 82ad8cca35..098fa85f07 100644 --- a/core/modules/filters/all/current.js +++ b/core/modules/filters/all/current.js @@ -6,10 +6,7 @@ module-type: allfilteroperator Filter function for [all[current]] \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; /* @@ -23,5 +20,3 @@ exports.current = function(source,prefix,options) { return []; } }; - -})(); diff --git a/core/modules/filters/all/missing.js b/core/modules/filters/all/missing.js index 4ba932089c..c87e43c98e 100644 --- a/core/modules/filters/all/missing.js +++ b/core/modules/filters/all/missing.js @@ -6,10 +6,7 @@ module-type: allfilteroperator Filter function for [all[missing]] \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; /* @@ -18,5 +15,3 @@ Export our filter function exports.missing = function(source,prefix,options) { return options.wiki.getMissingTitles(); }; - -})(); diff --git a/core/modules/filters/all/orphans.js b/core/modules/filters/all/orphans.js index d5b4fc2702..a2e29ba97a 100644 --- a/core/modules/filters/all/orphans.js +++ b/core/modules/filters/all/orphans.js @@ -6,10 +6,7 @@ module-type: allfilteroperator Filter function for [all[orphans]] \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; /* @@ -18,5 +15,3 @@ Export our filter function exports.orphans = function(source,prefix,options) { return options.wiki.getOrphanTitles(); }; - -})(); diff --git a/core/modules/filters/all/shadows.js b/core/modules/filters/all/shadows.js index 51654fee20..7946afa736 100644 --- a/core/modules/filters/all/shadows.js +++ b/core/modules/filters/all/shadows.js @@ -6,10 +6,7 @@ module-type: allfilteroperator Filter function for [all[shadows]] \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; /* @@ -18,5 +15,3 @@ Export our filter function exports.shadows = function(source,prefix,options) { return options.wiki.allShadowTitles(); }; - -})(); diff --git a/core/modules/filters/all/tags.js b/core/modules/filters/all/tags.js index 2aaa9dec25..de243453fe 100644 --- a/core/modules/filters/all/tags.js +++ b/core/modules/filters/all/tags.js @@ -6,10 +6,7 @@ module-type: allfilteroperator Filter function for [all[tags]] \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; /* @@ -18,5 +15,3 @@ Export our filter function exports.tags = function(source,prefix,options) { return Object.keys(options.wiki.getTagMap()); }; - -})(); diff --git a/core/modules/filters/all/tiddlers.js b/core/modules/filters/all/tiddlers.js index 9a6e438756..4e480bf4da 100644 --- a/core/modules/filters/all/tiddlers.js +++ b/core/modules/filters/all/tiddlers.js @@ -6,10 +6,7 @@ module-type: allfilteroperator Filter function for [all[tiddlers]] \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; /* @@ -18,5 +15,3 @@ Export our filter function exports.tiddlers = function(source,prefix,options) { return options.wiki.allTitles(); }; - -})(); diff --git a/core/modules/filters/backlinks.js b/core/modules/filters/backlinks.js index f066d936a6..f8bd4903a3 100644 --- a/core/modules/filters/backlinks.js +++ b/core/modules/filters/backlinks.js @@ -6,10 +6,7 @@ module-type: filteroperator Filter operator for returning all the backlinks from a tiddler \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; /* @@ -22,5 +19,3 @@ exports.backlinks = function(source,operator,options) { }); return results.makeTiddlerIterator(options.wiki); }; - -})(); diff --git a/core/modules/filters/backtranscludes.js b/core/modules/filters/backtranscludes.js index 253b9dd7b4..2451ab9416 100644 --- a/core/modules/filters/backtranscludes.js +++ b/core/modules/filters/backtranscludes.js @@ -7,9 +7,6 @@ Filter operator for returning all the backtranscludes from a tiddler \*/ (function(){ - -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; /* diff --git a/core/modules/filters/before.js b/core/modules/filters/before.js index 292cc619d3..1d3473b69f 100644 --- a/core/modules/filters/before.js +++ b/core/modules/filters/before.js @@ -6,10 +6,7 @@ module-type: filteroperator Filter operator returning the tiddler from the current list that is before the tiddler named in the operand. \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; /* @@ -27,5 +24,3 @@ exports.before = function(source,operator,options) { return [results[index - 1]]; } }; - -})(); diff --git a/core/modules/filters/commands.js b/core/modules/filters/commands.js index 5ab575a783..753c8b8db6 100644 --- a/core/modules/filters/commands.js +++ b/core/modules/filters/commands.js @@ -6,10 +6,7 @@ module-type: filteroperator Filter operator for returning the names of the commands available in this wiki \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; /* @@ -23,5 +20,3 @@ exports.commands = function(source,operator,options) { results.sort(); return results; }; - -})(); diff --git a/core/modules/filters/compare.js b/core/modules/filters/compare.js index fd509a28ef..ac84f8da2b 100644 --- a/core/modules/filters/compare.js +++ b/core/modules/filters/compare.js @@ -6,10 +6,7 @@ module-type: filteroperator General purpose comparison operator \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; exports.compare = function(source,operator,options) { @@ -36,5 +33,3 @@ var modes = { "lteq": function(value) {return value <= 0;}, "lt": function(value) {return value < 0;} } - -})(); diff --git a/core/modules/filters/contains.js b/core/modules/filters/contains.js index 918f415cdb..910b43a4a9 100644 --- a/core/modules/filters/contains.js +++ b/core/modules/filters/contains.js @@ -6,10 +6,7 @@ module-type: filteroperator Filter operator for finding values in array fields \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; /* @@ -41,5 +38,3 @@ exports.contains = function(source,operator,options) { } return results; }; - -})(); diff --git a/core/modules/filters/count.js b/core/modules/filters/count.js index 638b135dfc..3a7be70ad3 100644 --- a/core/modules/filters/count.js +++ b/core/modules/filters/count.js @@ -6,10 +6,7 @@ module-type: filteroperator Filter operator returning the number of entries in the current list. \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; /* @@ -22,5 +19,3 @@ exports.count = function(source,operator,options) { }); return [count + ""]; }; - -})(); diff --git a/core/modules/filters/crypto.js b/core/modules/filters/crypto.js index cfb524d061..8b05220b2a 100644 --- a/core/modules/filters/crypto.js +++ b/core/modules/filters/crypto.js @@ -6,10 +6,7 @@ module-type: filteroperator Filter operators for cryptography, using the Stanford JavaScript library \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; exports.sha256 = function(source,operator,options) { @@ -20,5 +17,3 @@ exports.sha256 = function(source,operator,options) { }); return results; }; - -})(); diff --git a/core/modules/filters/days.js b/core/modules/filters/days.js index 318d72567b..663416d64c 100644 --- a/core/modules/filters/days.js +++ b/core/modules/filters/days.js @@ -6,10 +6,7 @@ module-type: filteroperator Filter operator that selects tiddlers with a specified date field within a specified date interval. \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; /* @@ -46,5 +43,3 @@ exports.days = function(source,operator,options) { } return results; }; - -})(); diff --git a/core/modules/filters/deserialize.js b/core/modules/filters/deserialize.js index 5511f29e80..cebab43d32 100644 --- a/core/modules/filters/deserialize.js +++ b/core/modules/filters/deserialize.js @@ -4,10 +4,7 @@ type: application/javascript module-type: filteroperator Filter operator for deserializing string data into JSON representing tiddlers \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; exports["deserialize"] = function(source,operator,options) { @@ -35,5 +32,3 @@ exports["deserialize"] = function(source,operator,options) { } return results; } - -})(); \ No newline at end of file diff --git a/core/modules/filters/deserializers.js b/core/modules/filters/deserializers.js index ddca998ea3..7ab96fbaea 100644 --- a/core/modules/filters/deserializers.js +++ b/core/modules/filters/deserializers.js @@ -6,10 +6,7 @@ module-type: filteroperator Filter operator for returning the names of the deserializers in this wiki \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; /* @@ -23,5 +20,3 @@ exports.deserializers = function(source,operator,options) { results.sort(); return results; }; - -})(); \ No newline at end of file diff --git a/core/modules/filters/duplicateslugs.js b/core/modules/filters/duplicateslugs.js index dbd2f23e71..30b6da0a72 100644 --- a/core/modules/filters/duplicateslugs.js +++ b/core/modules/filters/duplicateslugs.js @@ -6,10 +6,7 @@ module-type: filteroperator Filter function for [duplicateslugs[]] \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; /* @@ -32,5 +29,3 @@ exports.duplicateslugs = function(source,operator,options) { }); return results; }; - -})(); diff --git a/core/modules/filters/each.js b/core/modules/filters/each.js index 5c2c290776..0a389b5c3e 100644 --- a/core/modules/filters/each.js +++ b/core/modules/filters/each.js @@ -7,10 +7,7 @@ Filter operator that selects one tiddler for each unique value of the specified With suffix "list", selects all tiddlers that are values in a specified list field. \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; /* @@ -63,5 +60,3 @@ exports.each = function(source,operator,options) { } return results; }; - -})(); diff --git a/core/modules/filters/eachday.js b/core/modules/filters/eachday.js index 6fdccf879c..86f343e25e 100644 --- a/core/modules/filters/eachday.js +++ b/core/modules/filters/eachday.js @@ -6,10 +6,7 @@ module-type: filteroperator Filter operator that selects one tiddler for each unique day covered by the specified date field \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; /* @@ -35,5 +32,3 @@ exports.eachday = function(source,operator,options) { }); return results; }; - -})(); diff --git a/core/modules/filters/editiondescription.js b/core/modules/filters/editiondescription.js index 2ee387163d..ce526a9a96 100644 --- a/core/modules/filters/editiondescription.js +++ b/core/modules/filters/editiondescription.js @@ -6,10 +6,7 @@ module-type: filteroperator Filter operator for returning the descriptions of the specified edition names \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; /* @@ -29,5 +26,3 @@ exports.editiondescription = function(source,operator,options) { } return results; }; - -})(); diff --git a/core/modules/filters/editions.js b/core/modules/filters/editions.js index 05ae57c312..919dacfe97 100644 --- a/core/modules/filters/editions.js +++ b/core/modules/filters/editions.js @@ -6,10 +6,7 @@ module-type: filteroperator Filter operator for returning the names of the available editions in this wiki \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; /* @@ -28,5 +25,3 @@ exports.editions = function(source,operator,options) { } return results; }; - -})(); diff --git a/core/modules/filters/else.js b/core/modules/filters/else.js index c3829371ec..cffcf33ef3 100644 --- a/core/modules/filters/else.js +++ b/core/modules/filters/else.js @@ -6,10 +6,7 @@ module-type: filteroperator Filter operator for replacing an empty input list with a constant, passing a non-empty input list straight through \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; /* @@ -26,5 +23,3 @@ exports.else = function(source,operator,options) { return results; } }; - -})(); diff --git a/core/modules/filters/encodings.js b/core/modules/filters/encodings.js index 231e4d1197..ecb0d7289d 100644 --- a/core/modules/filters/encodings.js +++ b/core/modules/filters/encodings.js @@ -6,10 +6,7 @@ module-type: filteroperator Filter operator for applying decodeURIComponent() to each item. \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; /* @@ -116,5 +113,3 @@ exports.escapecss = function(source,operator,options) { }); return results; }; - -})(); diff --git a/core/modules/filters/enlist.js b/core/modules/filters/enlist.js index 0baaa93663..69aa9e9e0d 100644 --- a/core/modules/filters/enlist.js +++ b/core/modules/filters/enlist.js @@ -6,10 +6,7 @@ module-type: filteroperator Filter operator returning its operand parsed as a list \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; /* @@ -38,5 +35,3 @@ exports.enlist = function(source,operator,options) { return list; } }; - -})(); diff --git a/core/modules/filters/field.js b/core/modules/filters/field.js index 3a07c0c27a..8dd608d457 100644 --- a/core/modules/filters/field.js +++ b/core/modules/filters/field.js @@ -6,10 +6,7 @@ module-type: filteroperator Filter operator for comparing fields for equality \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; /* @@ -71,5 +68,3 @@ exports.field = function(source,operator,options) { } return results; }; - -})(); diff --git a/core/modules/filters/fields.js b/core/modules/filters/fields.js index 2f0bf26dc5..e569f0e5e3 100644 --- a/core/modules/filters/fields.js +++ b/core/modules/filters/fields.js @@ -6,10 +6,7 @@ module-type: filteroperator Filter operator for returning the names of the fields on the selected tiddlers \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; /* @@ -41,5 +38,3 @@ exports.fields = function(source,operator,options) { }); return results; }; - -})(); diff --git a/core/modules/filters/filter.js b/core/modules/filters/filter.js index f15cbefc52..466d43f8b3 100644 --- a/core/modules/filters/filter.js +++ b/core/modules/filters/filter.js @@ -6,10 +6,7 @@ module-type: filteroperator Filter operator returning those input titles that pass a subfilter \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; /* @@ -30,5 +27,3 @@ exports.filter = function(source,operator,options) { }); return results; }; - -})(); diff --git a/core/modules/filters/format.js b/core/modules/filters/format.js index 2fc786d887..944007797a 100644 --- a/core/modules/filters/format.js +++ b/core/modules/filters/format.js @@ -4,10 +4,7 @@ type: application/javascript module-type: filteroperator Filter operator for formatting strings \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; var formatFilterOperators; @@ -42,5 +39,3 @@ exports.format = function(source,operator,options) { return results; } }; - -})(); \ No newline at end of file diff --git a/core/modules/filters/format/date.js b/core/modules/filters/format/date.js index fcf1a5cad0..c74df3444e 100644 --- a/core/modules/filters/format/date.js +++ b/core/modules/filters/format/date.js @@ -3,10 +3,7 @@ title: $:/core/modules/filters/format/date.js type: application/javascript module-type: formatfilteroperator \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; /* @@ -22,5 +19,3 @@ exports.date = function(source,operand,options) { }); return results; }; - -})(); \ No newline at end of file diff --git a/core/modules/filters/format/json.js b/core/modules/filters/format/json.js index 2130a76ed3..5db3658e74 100644 --- a/core/modules/filters/format/json.js +++ b/core/modules/filters/format/json.js @@ -3,10 +3,7 @@ title: $:/core/modules/filters/format/json.js type: application/javascript module-type: formatfilteroperator \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; /* @@ -31,5 +28,3 @@ exports.json = function(source,operand,options) { }); return results; }; - -})(); \ No newline at end of file diff --git a/core/modules/filters/format/relativedate.js b/core/modules/filters/format/relativedate.js index f771bb3397..ab9c02d72b 100644 --- a/core/modules/filters/format/relativedate.js +++ b/core/modules/filters/format/relativedate.js @@ -3,10 +3,7 @@ title: $:/core/modules/filters/format/relativedate.js type: application/javascript module-type: formatfilteroperator \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; /* @@ -22,5 +19,3 @@ exports.relativedate = function(source,operand,options) { }); return results; }; - -})(); \ No newline at end of file diff --git a/core/modules/filters/format/timestamp.js b/core/modules/filters/format/timestamp.js index d6f5afe30d..9be351c339 100644 --- a/core/modules/filters/format/timestamp.js +++ b/core/modules/filters/format/timestamp.js @@ -3,10 +3,7 @@ title: $:/core/modules/filters/format/timestamp.js type: application/javascript module-type: formatfilteroperator \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; /* @@ -22,4 +19,3 @@ exports.timestamp = function(source,operand,options) { }); return results; }; -})(); \ No newline at end of file diff --git a/core/modules/filters/format/titlelist.js b/core/modules/filters/format/titlelist.js index 47608323d2..9e9c827ef1 100644 --- a/core/modules/filters/format/titlelist.js +++ b/core/modules/filters/format/titlelist.js @@ -3,10 +3,7 @@ title: $:/core/modules/filters/format/titlelist.js type: application/javascript module-type: formatfilteroperator \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; /* @@ -21,5 +18,3 @@ exports.titlelist = function(source,operand,options) { }); return results; }; - -})(); diff --git a/core/modules/filters/function.js b/core/modules/filters/function.js index bc0702cf4f..b6f2fa6365 100644 --- a/core/modules/filters/function.js +++ b/core/modules/filters/function.js @@ -6,10 +6,7 @@ module-type: filteroperator Filter operator returning those input titles that are returned from a function \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; /* @@ -37,5 +34,3 @@ exports.function = function(source,operator,options) { // console.log(`function ${functionName} with params ${JSON.stringify(params)} results: ${JSON.stringify(results)}`); return results; }; - -})(); diff --git a/core/modules/filters/get.js b/core/modules/filters/get.js index feae6684ed..8c078ec85c 100644 --- a/core/modules/filters/get.js +++ b/core/modules/filters/get.js @@ -6,10 +6,7 @@ module-type: filteroperator Filter operator for replacing tiddler titles by the value of the field specified in the operand. \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; /* @@ -27,5 +24,3 @@ exports.get = function(source,operator,options) { }); return results; }; - -})(); diff --git a/core/modules/filters/getindex.js b/core/modules/filters/getindex.js index b604d4ec8e..ce34b33565 100644 --- a/core/modules/filters/getindex.js +++ b/core/modules/filters/getindex.js @@ -6,10 +6,7 @@ module-type: filteroperator returns the value at a given index of datatiddlers \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; /* @@ -28,5 +25,3 @@ exports.getindex = function(source,operator,options) { } return results; }; - -})(); diff --git a/core/modules/filters/getvariable.js b/core/modules/filters/getvariable.js index 43451abed8..eab6971943 100644 --- a/core/modules/filters/getvariable.js +++ b/core/modules/filters/getvariable.js @@ -6,10 +6,7 @@ module-type: filteroperator Filter operator for replacing input values by the value of the variable with the same name, or blank if the variable is missing \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; /* @@ -22,5 +19,3 @@ exports.getvariable = function(source,operator,options) { }); return results; }; - -})(); diff --git a/core/modules/filters/has.js b/core/modules/filters/has.js index f081809a3e..ceb117f9c1 100644 --- a/core/modules/filters/has.js +++ b/core/modules/filters/has.js @@ -6,10 +6,7 @@ module-type: filteroperator Filter operator for checking if a tiddler has the specified field or index \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; /* @@ -66,5 +63,3 @@ exports.has = function(source,operator,options) { } return results; }; - -})(); diff --git a/core/modules/filters/haschanged.js b/core/modules/filters/haschanged.js index 4c63b7758d..43d660cb95 100644 --- a/core/modules/filters/haschanged.js +++ b/core/modules/filters/haschanged.js @@ -6,10 +6,7 @@ module-type: filteroperator Filter operator returns tiddlers from the list that have a non-zero changecount. \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; /* @@ -32,5 +29,3 @@ exports.haschanged = function(source,operator,options) { } return results; }; - -})(); diff --git a/core/modules/filters/indexes.js b/core/modules/filters/indexes.js index 3bbb226591..1de730217f 100644 --- a/core/modules/filters/indexes.js +++ b/core/modules/filters/indexes.js @@ -6,10 +6,7 @@ module-type: filteroperator Filter operator for returning the indexes of a data tiddler \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; /* @@ -26,5 +23,3 @@ exports.indexes = function(source,operator,options) { results.sort(); return results; }; - -})(); diff --git a/core/modules/filters/insertafter.js b/core/modules/filters/insertafter.js index 79c84cb95c..a8f1edf129 100644 --- a/core/modules/filters/insertafter.js +++ b/core/modules/filters/insertafter.js @@ -6,10 +6,7 @@ module-type: filteroperator Insert an item after another item in a list \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; /* @@ -42,5 +39,3 @@ exports.insertafter = function(source,operator,options) { } return results; }; - -})(); diff --git a/core/modules/filters/insertbefore.js b/core/modules/filters/insertbefore.js index 4a032daf97..33e41887f0 100644 --- a/core/modules/filters/insertbefore.js +++ b/core/modules/filters/insertbefore.js @@ -6,10 +6,7 @@ module-type: filteroperator Insert an item before another item in a list \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; /* @@ -42,5 +39,3 @@ exports.insertbefore = function(source,operator,options) { } return results; }; - -})(); diff --git a/core/modules/filters/is.js b/core/modules/filters/is.js index b759437864..87861a6e92 100644 --- a/core/modules/filters/is.js +++ b/core/modules/filters/is.js @@ -6,10 +6,7 @@ module-type: filteroperator Filter operator for checking tiddler properties \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; var isFilterOperators; @@ -44,5 +41,3 @@ exports.is = function(source,operator,options) { return results; } }; - -})(); \ No newline at end of file diff --git a/core/modules/filters/is/binary.js b/core/modules/filters/is/binary.js index 01b9aabd39..7fb02772e5 100644 --- a/core/modules/filters/is/binary.js +++ b/core/modules/filters/is/binary.js @@ -6,10 +6,7 @@ module-type: isfilteroperator Filter function for [is[binary]] \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; /* @@ -32,5 +29,3 @@ exports.binary = function(source,prefix,options) { } return results; }; - -})(); diff --git a/core/modules/filters/is/blank.js b/core/modules/filters/is/blank.js index 8f500da452..274d3eba11 100644 --- a/core/modules/filters/is/blank.js +++ b/core/modules/filters/is/blank.js @@ -6,10 +6,7 @@ module-type: isfilteroperator Filter function for [is[blank]] \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; /* @@ -32,5 +29,3 @@ exports.blank = function(source,prefix,options) { } return results; }; - -})(); diff --git a/core/modules/filters/is/current.js b/core/modules/filters/is/current.js index b5b88f6167..1853c5e28b 100644 --- a/core/modules/filters/is/current.js +++ b/core/modules/filters/is/current.js @@ -6,10 +6,7 @@ module-type: isfilteroperator Filter function for [is[current]] \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; /* @@ -33,5 +30,3 @@ exports.current = function(source,prefix,options) { } return results; }; - -})(); diff --git a/core/modules/filters/is/draft.js b/core/modules/filters/is/draft.js index 016da3f49a..caba7849fa 100644 --- a/core/modules/filters/is/draft.js +++ b/core/modules/filters/is/draft.js @@ -6,10 +6,7 @@ module-type: isfilteroperator Filter function for [is[draft]] analagous to [has[draft.of]] \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; /* @@ -32,5 +29,3 @@ exports.draft = function(source,prefix,options) { } return results; }; - -})(); diff --git a/core/modules/filters/is/image.js b/core/modules/filters/is/image.js index 3527540d33..be276c8348 100644 --- a/core/modules/filters/is/image.js +++ b/core/modules/filters/is/image.js @@ -6,10 +6,7 @@ module-type: isfilteroperator Filter function for [is[image]] \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; /* @@ -32,5 +29,3 @@ exports.image = function(source,prefix,options) { } return results; }; - -})(); diff --git a/core/modules/filters/is/missing.js b/core/modules/filters/is/missing.js index 8ebf90d41b..7720ac4727 100644 --- a/core/modules/filters/is/missing.js +++ b/core/modules/filters/is/missing.js @@ -6,10 +6,7 @@ module-type: isfilteroperator Filter function for [is[missing]] \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; /* @@ -32,5 +29,3 @@ exports.missing = function(source,prefix,options) { } return results; }; - -})(); diff --git a/core/modules/filters/is/orphan.js b/core/modules/filters/is/orphan.js index 94d09ad613..8827da4c94 100644 --- a/core/modules/filters/is/orphan.js +++ b/core/modules/filters/is/orphan.js @@ -6,10 +6,7 @@ module-type: isfilteroperator Filter function for [is[orphan]] \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; /* @@ -33,5 +30,3 @@ exports.orphan = function(source,prefix,options) { } return results; }; - -})(); diff --git a/core/modules/filters/is/shadow.js b/core/modules/filters/is/shadow.js index cfb6b926cb..4f1335c692 100644 --- a/core/modules/filters/is/shadow.js +++ b/core/modules/filters/is/shadow.js @@ -6,10 +6,7 @@ module-type: isfilteroperator Filter function for [is[shadow]] \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; /* @@ -32,5 +29,3 @@ exports.shadow = function(source,prefix,options) { } return results; }; - -})(); diff --git a/core/modules/filters/is/system.js b/core/modules/filters/is/system.js index 84d0656fdb..b27feb3923 100644 --- a/core/modules/filters/is/system.js +++ b/core/modules/filters/is/system.js @@ -6,10 +6,7 @@ module-type: isfilteroperator Filter function for [is[system]] \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; /* @@ -32,5 +29,3 @@ exports.system = function(source,prefix,options) { } return results; }; - -})(); diff --git a/core/modules/filters/is/tag.js b/core/modules/filters/is/tag.js index d614029c4b..69d1713be9 100644 --- a/core/modules/filters/is/tag.js +++ b/core/modules/filters/is/tag.js @@ -6,10 +6,7 @@ module-type: isfilteroperator Filter function for [is[tag]] \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; /* @@ -33,5 +30,3 @@ exports.tag = function(source,prefix,options) { } return results; }; - -})(); diff --git a/core/modules/filters/is/tiddler.js b/core/modules/filters/is/tiddler.js index d97cd78923..24ca5cee29 100644 --- a/core/modules/filters/is/tiddler.js +++ b/core/modules/filters/is/tiddler.js @@ -6,10 +6,7 @@ module-type: isfilteroperator Filter function for [is[tiddler]] \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; /* @@ -32,5 +29,3 @@ exports.tiddler = function(source,prefix,options) { } return results; }; - -})(); diff --git a/core/modules/filters/is/variable.js b/core/modules/filters/is/variable.js index 110d9a7c83..624a179d72 100644 --- a/core/modules/filters/is/variable.js +++ b/core/modules/filters/is/variable.js @@ -6,10 +6,7 @@ module-type: isfilteroperator Filter function for [is[variable]] \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; /* @@ -32,5 +29,3 @@ exports.variable = function(source,prefix,options) { } return results; }; - -})(); diff --git a/core/modules/filters/json-ops.js b/core/modules/filters/json-ops.js index 0c58964ebc..8f16ad4175 100644 --- a/core/modules/filters/json-ops.js +++ b/core/modules/filters/json-ops.js @@ -6,10 +6,7 @@ module-type: filteroperator Filter operators for JSON operations \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; exports["jsonget"] = function(source,operator,options) { @@ -279,6 +276,3 @@ function setDataItem(data,indexes,value) { } return data; } - -})(); - \ No newline at end of file diff --git a/core/modules/filters/limit.js b/core/modules/filters/limit.js index c878c1ac77..9b440155e8 100644 --- a/core/modules/filters/limit.js +++ b/core/modules/filters/limit.js @@ -6,10 +6,7 @@ module-type: filteroperator Filter operator for chopping the results to a specified maximum number of entries \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; /* @@ -30,5 +27,3 @@ exports.limit = function(source,operator,options) { } return results; }; - -})(); diff --git a/core/modules/filters/links.js b/core/modules/filters/links.js index 0305f4b7f9..0b56a8871e 100644 --- a/core/modules/filters/links.js +++ b/core/modules/filters/links.js @@ -6,10 +6,7 @@ module-type: filteroperator Filter operator for returning all the links from a tiddler \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; /* @@ -22,5 +19,3 @@ exports.links = function(source,operator,options) { }); return results.makeTiddlerIterator(options.wiki); }; - -})(); diff --git a/core/modules/filters/list.js b/core/modules/filters/list.js index 1b23b9382b..2a5e7b8bbf 100644 --- a/core/modules/filters/list.js +++ b/core/modules/filters/list.js @@ -6,10 +6,7 @@ module-type: filteroperator Filter operator returning the tiddlers whose title is listed in the operand tiddler \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; /* @@ -31,5 +28,3 @@ exports.list = function(source,operator,options) { } return results; }; - -})(); diff --git a/core/modules/filters/listed.js b/core/modules/filters/listed.js index 8cb1c2f68e..6103052458 100644 --- a/core/modules/filters/listed.js +++ b/core/modules/filters/listed.js @@ -6,10 +6,7 @@ module-type: filteroperator Filter operator returning all tiddlers that have the selected tiddlers in a list \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; /* @@ -23,5 +20,3 @@ exports.listed = function(source,operator,options) { }); return results; }; - -})(); diff --git a/core/modules/filters/listops.js b/core/modules/filters/listops.js index 89bd8eeb7c..ccd81b9fe1 100644 --- a/core/modules/filters/listops.js +++ b/core/modules/filters/listops.js @@ -6,10 +6,7 @@ module-type: filteroperator Filter operators for manipulating the current selection list \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; /* @@ -116,5 +113,3 @@ exports.zth = function(source,operator,options) { }); return results.slice(count,count + 1); }; - -})(); diff --git a/core/modules/filters/lookup.js b/core/modules/filters/lookup.js index aaf81729d2..f500b87ddc 100644 --- a/core/modules/filters/lookup.js +++ b/core/modules/filters/lookup.js @@ -12,10 +12,7 @@ field or index value. If the 2nd suffix does not exist, it defaults to field. If the second operand is missing it defaults to "text" for fields, and "0" for indexes \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; /* @@ -49,5 +46,3 @@ exports.lookup = function(source,operator,options) { } return results; }; - -})(); diff --git a/core/modules/filters/match.js b/core/modules/filters/match.js index 34caf487e3..ce0b2b9d44 100644 --- a/core/modules/filters/match.js +++ b/core/modules/filters/match.js @@ -6,10 +6,7 @@ module-type: filteroperator Filter operator for checking if a title matches a string \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; /* @@ -49,5 +46,3 @@ exports.match = function(source,operator,options) { } return results; }; - -})(); diff --git a/core/modules/filters/math.js b/core/modules/filters/math.js index 6b1d45f088..4c2a9168a6 100644 --- a/core/modules/filters/math.js +++ b/core/modules/filters/math.js @@ -13,10 +13,7 @@ Note that strings are converted to numbers automatically. Trailing non-digits ar * "12kk" converts to 12 \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; exports.negate = makeNumericBinaryOperator( @@ -243,5 +240,3 @@ function makeNumericArrayOperator(fnCalc) { return results; }; }; - -})(); diff --git a/core/modules/filters/minlength.js b/core/modules/filters/minlength.js index d4e679bef1..4428049f83 100644 --- a/core/modules/filters/minlength.js +++ b/core/modules/filters/minlength.js @@ -6,10 +6,7 @@ module-type: filteroperator Filter operator for filtering out titles that don't meet the minimum length in the operand \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; /* @@ -25,5 +22,3 @@ exports.minlength = function(source,operator,options) { }); return results; }; - -})(); diff --git a/core/modules/filters/moduleproperty.js b/core/modules/filters/moduleproperty.js index 2aa0e6a0ca..67b994d52c 100644 --- a/core/modules/filters/moduleproperty.js +++ b/core/modules/filters/moduleproperty.js @@ -6,10 +6,7 @@ module-type: filteroperator Filter [[module-name]moduleproperty[name]] retrieve a module property \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; /* @@ -33,5 +30,3 @@ exports.moduleproperty = function(source,operator,options) { results.sort(); return results; }; - -})(); diff --git a/core/modules/filters/modules.js b/core/modules/filters/modules.js index a9e1850187..b09d8d825d 100644 --- a/core/modules/filters/modules.js +++ b/core/modules/filters/modules.js @@ -6,10 +6,7 @@ module-type: filteroperator Filter operator for returning the titles of the modules of a given type in this wiki \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; /* @@ -37,5 +34,3 @@ exports.modules = function(source,operator,options) { results.sort(); return results; }; - -})(); diff --git a/core/modules/filters/moduletypes.js b/core/modules/filters/moduletypes.js index 67321caea1..752c383ac5 100644 --- a/core/modules/filters/moduletypes.js +++ b/core/modules/filters/moduletypes.js @@ -6,10 +6,7 @@ module-type: filteroperator Filter operator for returning the names of the module types in this wiki \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; /* @@ -23,5 +20,3 @@ exports.moduletypes = function(source,operator,options) { results.sort(); return results; }; - -})(); diff --git a/core/modules/filters/next.js b/core/modules/filters/next.js index c12295bf59..01c7e1f90a 100644 --- a/core/modules/filters/next.js +++ b/core/modules/filters/next.js @@ -6,10 +6,7 @@ module-type: filteroperator Filter operator returning the tiddler whose title occurs next in the list supplied in the operand tiddler \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; /* @@ -28,5 +25,3 @@ exports.next = function(source,operator,options) { }); return results; }; - -})(); diff --git a/core/modules/filters/plugintiddlers.js b/core/modules/filters/plugintiddlers.js index 489ec52e5f..c56f88a919 100644 --- a/core/modules/filters/plugintiddlers.js +++ b/core/modules/filters/plugintiddlers.js @@ -6,10 +6,7 @@ module-type: filteroperator Filter operator for returning the titles of the shadow tiddlers within a plugin \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; /* @@ -28,5 +25,3 @@ exports.plugintiddlers = function(source,operator,options) { results.sort(); return results; }; - -})(); diff --git a/core/modules/filters/prefix.js b/core/modules/filters/prefix.js index 97dd56f4e0..9b53cd78ea 100644 --- a/core/modules/filters/prefix.js +++ b/core/modules/filters/prefix.js @@ -6,10 +6,7 @@ module-type: filteroperator Filter operator for checking if a title starts with a prefix \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; /* @@ -50,5 +47,3 @@ exports.prefix = function(source,operator,options) { } return results; }; - -})(); diff --git a/core/modules/filters/previous.js b/core/modules/filters/previous.js index ed975458cd..2d76aa59f1 100644 --- a/core/modules/filters/previous.js +++ b/core/modules/filters/previous.js @@ -6,10 +6,7 @@ module-type: filteroperator Filter operator returning the tiddler whose title occurs immediately prior in the list supplied in the operand tiddler \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; /* @@ -28,5 +25,3 @@ exports.previous = function(source,operator,options) { }); return results; }; - -})(); diff --git a/core/modules/filters/range.js b/core/modules/filters/range.js index 09b8d0334b..7932e85483 100644 --- a/core/modules/filters/range.js +++ b/core/modules/filters/range.js @@ -6,10 +6,7 @@ module-type: filteroperator Filter operator for generating a numeric range. \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; /* @@ -99,5 +96,3 @@ exports.range = function(source,operator,options) { } return results; }; - -})(); diff --git a/core/modules/filters/reduce.js b/core/modules/filters/reduce.js index efe8aea4a9..112a927bc4 100644 --- a/core/modules/filters/reduce.js +++ b/core/modules/filters/reduce.js @@ -6,10 +6,7 @@ module-type: filteroperator Filter operator evaluates a subfilter for each item, making the running total available in the variable `accumulator`, and the current index available in the variable `index` \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; /* @@ -44,5 +41,3 @@ exports.reduce = function(source,operator,options) { return []; } }; - -})(); diff --git a/core/modules/filters/regexp.js b/core/modules/filters/regexp.js index 837e77575c..b9d3e2377c 100644 --- a/core/modules/filters/regexp.js +++ b/core/modules/filters/regexp.js @@ -6,10 +6,7 @@ module-type: filteroperator Filter operator for regexp matching \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; /* @@ -68,5 +65,3 @@ exports.regexp = function(source,operator,options) { } return results; }; - -})(); diff --git a/core/modules/filters/removeprefix.js b/core/modules/filters/removeprefix.js index 185e1fc873..5e9e4919e1 100644 --- a/core/modules/filters/removeprefix.js +++ b/core/modules/filters/removeprefix.js @@ -6,10 +6,7 @@ module-type: filteroperator Filter operator for removing a prefix from each title in the list. Titles that do not start with the prefix are removed. \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; /* @@ -34,5 +31,3 @@ exports.removeprefix = function(source,operator,options) { } return results; }; - -})(); diff --git a/core/modules/filters/removesuffix.js b/core/modules/filters/removesuffix.js index 76c0c7b35f..98f4f9ba51 100644 --- a/core/modules/filters/removesuffix.js +++ b/core/modules/filters/removesuffix.js @@ -6,10 +6,7 @@ module-type: filteroperator Filter operator for removing a suffix from each title in the list. Titles that do not end with the suffix are removed. \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; /* @@ -38,5 +35,3 @@ exports.removesuffix = function(source,operator,options) { } return results; }; - -})(); diff --git a/core/modules/filters/sameday.js b/core/modules/filters/sameday.js index 5dfc351287..91e3e55e35 100644 --- a/core/modules/filters/sameday.js +++ b/core/modules/filters/sameday.js @@ -6,10 +6,7 @@ module-type: filteroperator Filter operator that selects tiddlers with a modified date field on the same day as the provided value. \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; /* @@ -29,5 +26,3 @@ exports.sameday = function(source,operator,options) { }); return results; }; - -})(); diff --git a/core/modules/filters/search.js b/core/modules/filters/search.js index dcb534c073..532cdc839a 100644 --- a/core/modules/filters/search.js +++ b/core/modules/filters/search.js @@ -6,10 +6,7 @@ module-type: filteroperator Filter operator for searching for the text in the operand tiddler \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; /* @@ -55,5 +52,3 @@ exports.search = function(source,operator,options) { }); } }; - -})(); diff --git a/core/modules/filters/shadowsource.js b/core/modules/filters/shadowsource.js index f16e2bcc77..2797599918 100644 --- a/core/modules/filters/shadowsource.js +++ b/core/modules/filters/shadowsource.js @@ -6,10 +6,7 @@ module-type: filteroperator Filter operator for returning the source plugins for shadow tiddlers \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; /* @@ -26,5 +23,3 @@ exports.shadowsource = function(source,operator,options) { results.sort(); return results; }; - -})(); diff --git a/core/modules/filters/slugify.js b/core/modules/filters/slugify.js index afc12423e3..694426d2a2 100644 --- a/core/modules/filters/slugify.js +++ b/core/modules/filters/slugify.js @@ -6,10 +6,7 @@ module-type: filteroperator Filter operator for slugifying a tiddler title \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; exports.slugify = function(source,operator,options) { @@ -19,5 +16,3 @@ exports.slugify = function(source,operator,options) { }); return results; }; - -})(); diff --git a/core/modules/filters/sort.js b/core/modules/filters/sort.js index 176cd47408..cdfe797283 100644 --- a/core/modules/filters/sort.js +++ b/core/modules/filters/sort.js @@ -6,10 +6,7 @@ module-type: filteroperator Filter operator for sorting \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; /* @@ -52,5 +49,3 @@ var prepare_results = function (source) { }); return results; }; - -})(); diff --git a/core/modules/filters/sortsub.js b/core/modules/filters/sortsub.js index d328be09c9..291829992a 100644 --- a/core/modules/filters/sortsub.js +++ b/core/modules/filters/sortsub.js @@ -6,10 +6,7 @@ module-type: filteroperator Filter operator for sorting by a subfilter \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; /* @@ -48,5 +45,3 @@ exports.sortsub = function(source,operator,options) { }); return results; }; - -})(); diff --git a/core/modules/filters/splitbefore.js b/core/modules/filters/splitbefore.js index 071cead3eb..c38b5480df 100644 --- a/core/modules/filters/splitbefore.js +++ b/core/modules/filters/splitbefore.js @@ -6,10 +6,7 @@ module-type: filteroperator Filter operator that splits each result on the first occurance of the specified separator and returns the unique values. \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; /* @@ -27,5 +24,3 @@ exports.splitbefore = function(source,operator,options) { }); return results; }; - -})(); diff --git a/core/modules/filters/storyviews.js b/core/modules/filters/storyviews.js index 41fffed92b..df097582ac 100644 --- a/core/modules/filters/storyviews.js +++ b/core/modules/filters/storyviews.js @@ -6,10 +6,7 @@ module-type: filteroperator Filter operator for returning the names of the story views in this wiki \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; /* @@ -25,5 +22,3 @@ exports.storyviews = function(source,operator,options) { results.sort(); return results; }; - -})(); diff --git a/core/modules/filters/strings.js b/core/modules/filters/strings.js index 11f7634b74..4183bac7f6 100644 --- a/core/modules/filters/strings.js +++ b/core/modules/filters/strings.js @@ -8,10 +8,7 @@ Filter operators for strings. Unary/binary operators work on each item in turn, Sum/product/maxall/minall operate on the entire list, returning a single item. \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; exports.length = makeStringBinaryOperator( @@ -293,5 +290,3 @@ exports.charcode = function(source,operator,options) { }); return [chars.join("")]; }; - -})(); \ No newline at end of file diff --git a/core/modules/filters/subfilter.js b/core/modules/filters/subfilter.js index 79ae82777d..5e35f7cd17 100644 --- a/core/modules/filters/subfilter.js +++ b/core/modules/filters/subfilter.js @@ -6,10 +6,7 @@ module-type: filteroperator Filter operator returning its operand evaluated as a filter \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; /* @@ -29,5 +26,3 @@ exports.subfilter = function(source,operator,options) { return list; } }; - -})(); diff --git a/core/modules/filters/substitute.js b/core/modules/filters/substitute.js index 655ef7321b..925e592863 100644 --- a/core/modules/filters/substitute.js +++ b/core/modules/filters/substitute.js @@ -6,10 +6,7 @@ module-type: filteroperator Filter operator for substituting variables and embedded filter expressions with their corresponding values \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; /* @@ -32,5 +29,3 @@ exports.substitute = function(source,operator,options) { return results; }; -})(); - \ No newline at end of file diff --git a/core/modules/filters/subtiddlerfields.js b/core/modules/filters/subtiddlerfields.js index 681dd243df..d16150706a 100644 --- a/core/modules/filters/subtiddlerfields.js +++ b/core/modules/filters/subtiddlerfields.js @@ -6,10 +6,7 @@ module-type: filteroperator Filter operator for returning the names of the fields on the selected subtiddlers of the plugin named in the operand \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; /* @@ -27,5 +24,3 @@ exports.subtiddlerfields = function(source,operator,options) { }); return results; }; - -})(); diff --git a/core/modules/filters/suffix.js b/core/modules/filters/suffix.js index 96b32c4a9e..e31d405685 100644 --- a/core/modules/filters/suffix.js +++ b/core/modules/filters/suffix.js @@ -6,10 +6,7 @@ module-type: filteroperator Filter operator for checking if a title ends with a suffix \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; /* @@ -54,5 +51,3 @@ exports.suffix = function(source,operator,options) { } return results; }; - -})(); diff --git a/core/modules/filters/tag.js b/core/modules/filters/tag.js index 951a28c6bd..fdb67af798 100644 --- a/core/modules/filters/tag.js +++ b/core/modules/filters/tag.js @@ -6,10 +6,7 @@ module-type: filteroperator Filter operator for checking for the presence of a tag \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; /* @@ -54,5 +51,3 @@ exports.tag = function(source,operator,options) { } return results; }; - -})(); diff --git a/core/modules/filters/tagging.js b/core/modules/filters/tagging.js index a7fea68ec1..0efff01ef0 100644 --- a/core/modules/filters/tagging.js +++ b/core/modules/filters/tagging.js @@ -6,10 +6,7 @@ module-type: filteroperator Filter operator returning all tiddlers that are tagged with the selected tiddlers \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; /* @@ -22,5 +19,3 @@ exports.tagging = function(source,operator,options) { }); return results; }; - -})(); diff --git a/core/modules/filters/tags.js b/core/modules/filters/tags.js index 4a73fd83fc..c4ce719c8c 100644 --- a/core/modules/filters/tags.js +++ b/core/modules/filters/tags.js @@ -6,10 +6,7 @@ module-type: filteroperator Filter operator returning all the tags of the selected tiddlers \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; /* @@ -27,5 +24,3 @@ exports.tags = function(source,operator,options) { }); return Object.keys(tags); }; - -})(); diff --git a/core/modules/filters/then.js b/core/modules/filters/then.js index 994775c08f..5d9c75a08b 100644 --- a/core/modules/filters/then.js +++ b/core/modules/filters/then.js @@ -6,10 +6,7 @@ module-type: filteroperator Filter operator for replacing any titles with a constant \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; /* @@ -22,5 +19,3 @@ exports.then = function(source,operator,options) { }); return results; }; - -})(); diff --git a/core/modules/filters/title.js b/core/modules/filters/title.js index 88ac6f1328..a1dff909b6 100644 --- a/core/modules/filters/title.js +++ b/core/modules/filters/title.js @@ -6,10 +6,7 @@ module-type: filteroperator Filter operator for comparing title fields for equality \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; /* @@ -28,5 +25,3 @@ exports.title = function(source,operator,options) { } return results; }; - -})(); diff --git a/core/modules/filters/transcludes.js b/core/modules/filters/transcludes.js index 8f42b3bae2..0245dcaa40 100644 --- a/core/modules/filters/transcludes.js +++ b/core/modules/filters/transcludes.js @@ -7,9 +7,6 @@ Filter operator for returning all the transcludes from a tiddler \*/ (function(){ - -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; /* diff --git a/core/modules/filters/unknown.js b/core/modules/filters/unknown.js index 6ae5baaf0a..8fe2a6889e 100644 --- a/core/modules/filters/unknown.js +++ b/core/modules/filters/unknown.js @@ -8,10 +8,7 @@ Filter operator for handling unknown filter operators. Not intended to be used directly by end users, hence the square brackets around the name. \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; var fieldFilterOperatorFn = require("$:/core/modules/filters/field.js").field; @@ -45,5 +42,3 @@ exports["[unknown]"] = function(source,operator,options) { // Otherwise, use the "field" operator return fieldFilterOperatorFn(source,operator,options); }; - -})(); diff --git a/core/modules/filters/untagged.js b/core/modules/filters/untagged.js index d16de87f8e..22f3f6d0c7 100644 --- a/core/modules/filters/untagged.js +++ b/core/modules/filters/untagged.js @@ -6,10 +6,7 @@ module-type: filteroperator Filter operator returning all the selected tiddlers that are untagged \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; /* @@ -25,5 +22,3 @@ exports.untagged = function(source,operator,options) { }); return results; }; - -})(); diff --git a/core/modules/filters/variables.js b/core/modules/filters/variables.js index c92b780d26..f35885cb06 100644 --- a/core/modules/filters/variables.js +++ b/core/modules/filters/variables.js @@ -6,10 +6,7 @@ module-type: filteroperator Filter operator for returning the names of the active variables \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; /* @@ -28,5 +25,3 @@ exports.variables = function(source,operator,options) { } return names.sort(); }; - -})(); diff --git a/core/modules/filters/wikiparserrules.js b/core/modules/filters/wikiparserrules.js index 213298515e..5bdbcdfdf4 100644 --- a/core/modules/filters/wikiparserrules.js +++ b/core/modules/filters/wikiparserrules.js @@ -6,10 +6,7 @@ module-type: filteroperator Filter operator for returning the names of the wiki parser rules in this wiki \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; /* @@ -27,5 +24,3 @@ exports.wikiparserrules = function(source,operator,options) { results.sort(); return results; }; - -})(); diff --git a/core/modules/filters/x-listops.js b/core/modules/filters/x-listops.js index ae17297a59..2f305d0ca3 100644 --- a/core/modules/filters/x-listops.js +++ b/core/modules/filters/x-listops.js @@ -6,10 +6,7 @@ module-type: filteroperator Extended filter operators to manipulate the current list. \*/ -(function () { - /*jslint node: true, browser: true */ - /*global $tw: false */ "use strict"; /* @@ -231,5 +228,3 @@ Extended filter operators to manipulate the current list. } return cycleValueInArray(results,operands,step); } - -})(); diff --git a/core/modules/indexers/field-indexer.js b/core/modules/indexers/field-indexer.js index 3aefc99ac5..47e89de34a 100644 --- a/core/modules/indexers/field-indexer.js +++ b/core/modules/indexers/field-indexer.js @@ -6,10 +6,7 @@ module-type: indexer Indexes the tiddlers with each field value \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global modules: false */ "use strict"; var DEFAULT_MAXIMUM_INDEXED_VALUE_LENGTH = 128; @@ -139,5 +136,3 @@ FieldIndexer.prototype.lookup = function(name,value) { }; exports.FieldIndexer = FieldIndexer; - -})(); diff --git a/core/modules/indexers/tag-indexer.js b/core/modules/indexers/tag-indexer.js index 4721fea088..7844173c63 100644 --- a/core/modules/indexers/tag-indexer.js +++ b/core/modules/indexers/tag-indexer.js @@ -6,10 +6,7 @@ module-type: indexer Indexes the tiddlers with each tag \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global modules: false */ "use strict"; function TagIndexer(wiki) { @@ -94,5 +91,3 @@ TagSubIndexer.prototype.lookup = function(tag) { exports.TagIndexer = TagIndexer; - -})(); diff --git a/core/modules/info/platform.js b/core/modules/info/platform.js index 0eb0b9ea8b..9775b2d6b4 100644 --- a/core/modules/info/platform.js +++ b/core/modules/info/platform.js @@ -6,10 +6,7 @@ module-type: info Initialise basic platform $:/info/ tiddlers \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; exports.getInfoTiddlerFields = function(updateInfoTiddlersCallback) { @@ -48,5 +45,3 @@ exports.getInfoTiddlerFields = function(updateInfoTiddlersCallback) { } return infoTiddlerFields; }; - -})(); diff --git a/core/modules/keyboard.js b/core/modules/keyboard.js index 1740ba35ba..8adab9e811 100644 --- a/core/modules/keyboard.js +++ b/core/modules/keyboard.js @@ -6,10 +6,7 @@ module-type: global Keyboard handling utilities \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; var namedKeys = { @@ -383,5 +380,3 @@ KeyboardManager.prototype.handleShortcutChanges = function(changedTiddlers) { }; exports.KeyboardManager = KeyboardManager; - -})(); diff --git a/core/modules/language.js b/core/modules/language.js index 5e44d66967..b0409ee4dd 100644 --- a/core/modules/language.js +++ b/core/modules/language.js @@ -6,10 +6,7 @@ module-type: global The $tw.Language() manages translateable strings \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; /* @@ -41,5 +38,3 @@ Language.prototype.getRawString = function(title) { }; exports.Language = Language; - -})(); diff --git a/core/modules/macros/changecount.js b/core/modules/macros/changecount.js index 2d0f62e5a3..871ce630d2 100644 --- a/core/modules/macros/changecount.js +++ b/core/modules/macros/changecount.js @@ -6,10 +6,7 @@ module-type: macro Macro to return the changecount for the current tiddler \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; /* @@ -26,5 +23,3 @@ Run the macro exports.run = function() { return this.wiki.getChangeCount(this.getVariable("currentTiddler")) + ""; }; - -})(); diff --git a/core/modules/macros/contrastcolour.js b/core/modules/macros/contrastcolour.js index eab6f0108f..8134bdeff1 100644 --- a/core/modules/macros/contrastcolour.js +++ b/core/modules/macros/contrastcolour.js @@ -6,10 +6,7 @@ module-type: macro Macro to choose which of two colours has the highest contrast with a base colour \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; /* @@ -51,5 +48,3 @@ exports.run = function(target,fallbackTarget,colourA,colourB) { brightnessB = rgbColourB[0] * 0.299 + rgbColourB[1] * 0.587 + rgbColourB[2] * 0.114; return Math.abs(brightnessTarget - brightnessA) > Math.abs(brightnessTarget - brightnessB) ? colourA : colourB; }; - -})(); diff --git a/core/modules/macros/csvtiddlers.js b/core/modules/macros/csvtiddlers.js index a492fd81c9..e5d2f91370 100644 --- a/core/modules/macros/csvtiddlers.js +++ b/core/modules/macros/csvtiddlers.js @@ -6,10 +6,7 @@ module-type: macro Macro to output tiddlers matching a filter to CSV \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; /* @@ -75,5 +72,3 @@ exports.run = function(filter,format) { function quoteAndEscape(value) { return "\"" + value.replace(/"/mg,"\"\"") + "\""; } - -})(); diff --git a/core/modules/macros/displayshortcuts.js b/core/modules/macros/displayshortcuts.js index b182972383..10f6c72210 100644 --- a/core/modules/macros/displayshortcuts.js +++ b/core/modules/macros/displayshortcuts.js @@ -6,10 +6,7 @@ module-type: macro Macro to display a list of keyboard shortcuts in human readable form. Notably, it resolves named shortcuts like `((bold))` to the underlying keystrokes. \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; /* @@ -41,5 +38,3 @@ exports.run = function(shortcuts,prefix,separator,suffix) { return ""; } }; - -})(); diff --git a/core/modules/macros/jsontiddler.js b/core/modules/macros/jsontiddler.js index 509fd55593..ff5ae3c9bd 100644 --- a/core/modules/macros/jsontiddler.js +++ b/core/modules/macros/jsontiddler.js @@ -6,10 +6,7 @@ module-type: macro Macro to output a single tiddler to JSON \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; /* @@ -37,4 +34,3 @@ exports.run = function(title) { return JSON.stringify(fields,null,$tw.config.preferences.jsonSpaces); }; -})(); diff --git a/core/modules/macros/jsontiddlers.js b/core/modules/macros/jsontiddlers.js index eeaf70d3a0..25e08f6b9f 100644 --- a/core/modules/macros/jsontiddlers.js +++ b/core/modules/macros/jsontiddlers.js @@ -6,10 +6,7 @@ module-type: macro Macro to output tiddlers matching a filter to JSON \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; /* @@ -29,5 +26,3 @@ Run the macro exports.run = function(filter,spaces) { return this.wiki.getTiddlersAsJson(filter,$tw.utils.parseInt(spaces)); }; - -})(); diff --git a/core/modules/macros/makedatauri.js b/core/modules/macros/makedatauri.js index 0ff862df1c..db67495e53 100644 --- a/core/modules/macros/makedatauri.js +++ b/core/modules/macros/makedatauri.js @@ -8,10 +8,7 @@ Macro to convert a string of text to a data URI <> \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; /* @@ -32,5 +29,3 @@ Run the macro exports.run = function(text,type,_canonical_uri) { return $tw.utils.makeDataUri(text,type,_canonical_uri); }; - -})(); diff --git a/core/modules/macros/now.js b/core/modules/macros/now.js index d0a15dce27..86513f1b9d 100644 --- a/core/modules/macros/now.js +++ b/core/modules/macros/now.js @@ -6,10 +6,7 @@ module-type: macro Macro to return a formatted version of the current time \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; /* @@ -28,5 +25,3 @@ Run the macro exports.run = function(format) { return $tw.utils.formatDateString(new Date(),format || "0hh:0mm, DDth MMM YYYY"); }; - -})(); diff --git a/core/modules/macros/qualify.js b/core/modules/macros/qualify.js index de9dc6c8e5..ff6716dd4b 100644 --- a/core/modules/macros/qualify.js +++ b/core/modules/macros/qualify.js @@ -6,10 +6,7 @@ module-type: macro Macro to qualify a state tiddler title according \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; /* @@ -28,5 +25,3 @@ Run the macro exports.run = function(title) { return title + "-" + this.getStateQualifier(); }; - -})(); diff --git a/core/modules/macros/resolvepath.js b/core/modules/macros/resolvepath.js index d84d87563e..68c2e4d047 100644 --- a/core/modules/macros/resolvepath.js +++ b/core/modules/macros/resolvepath.js @@ -6,10 +6,7 @@ module-type: macro Resolves a relative path for an absolute rootpath. \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; exports.name = "resolvepath"; @@ -25,5 +22,3 @@ Run the macro exports.run = function(source, root) { return $tw.utils.resolvePath(source, root); }; - -})(); diff --git a/core/modules/macros/unusedtitle.js b/core/modules/macros/unusedtitle.js index 1078f650d4..056c713df6 100644 --- a/core/modules/macros/unusedtitle.js +++ b/core/modules/macros/unusedtitle.js @@ -5,10 +5,7 @@ module-type: macro Macro to return a new title that is unused in the wiki. It can be given a name as a base. \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; exports.name = "unusedtitle"; @@ -33,5 +30,3 @@ exports.run = function(baseName,separator,template,startCount) { // options.prefix must be a string! return this.wiki.generateNewTitle(baseName, {"prefix": separator, "template": template, "startCount": startCount}).trim(); }; - -})(); diff --git a/core/modules/macros/version.js b/core/modules/macros/version.js index b0dd0b0d5c..0a5315b817 100644 --- a/core/modules/macros/version.js +++ b/core/modules/macros/version.js @@ -6,10 +6,7 @@ module-type: macro Macro to return the TiddlyWiki core version number \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; /* @@ -26,5 +23,3 @@ Run the macro exports.run = function() { return $tw.version; }; - -})(); diff --git a/core/modules/parsers/audioparser.js b/core/modules/parsers/audioparser.js index 5eb2ff9852..601de058e3 100644 --- a/core/modules/parsers/audioparser.js +++ b/core/modules/parsers/audioparser.js @@ -6,10 +6,7 @@ module-type: parser The audio parser parses an audio tiddler into an embeddable HTML element \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; var AudioParser = function(type,text,options) { @@ -36,6 +33,3 @@ exports["audio/ogg"] = AudioParser; exports["audio/mpeg"] = AudioParser; exports["audio/mp3"] = AudioParser; exports["audio/mp4"] = AudioParser; - -})(); - diff --git a/core/modules/parsers/binaryparser.js b/core/modules/parsers/binaryparser.js index 60e7b5ef02..947d9befaa 100644 --- a/core/modules/parsers/binaryparser.js +++ b/core/modules/parsers/binaryparser.js @@ -6,10 +6,7 @@ module-type: parser The binary parser parses a binary tiddler into a warning message and download link \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; var BINARY_WARNING_MESSAGE = "$:/core/ui/BinaryWarning"; @@ -69,6 +66,3 @@ var BinaryParser = function(type,text,options) { }; exports["application/octet-stream"] = BinaryParser; - -})(); - diff --git a/core/modules/parsers/csvparser.js b/core/modules/parsers/csvparser.js index f40b5f0e56..2d32b3a061 100644 --- a/core/modules/parsers/csvparser.js +++ b/core/modules/parsers/csvparser.js @@ -6,10 +6,7 @@ module-type: parser The CSV text parser processes CSV files into a table wrapped in a scrollable widget \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; var CsvParser = function(type,text,options) { @@ -58,6 +55,3 @@ var CsvParser = function(type,text,options) { exports["text/csv"] = CsvParser; exports["text/tab-delimited-values"] = CsvParser; - -})(); - diff --git a/core/modules/parsers/htmlparser.js b/core/modules/parsers/htmlparser.js index 24c9f5d3e3..fee869868d 100644 --- a/core/modules/parsers/htmlparser.js +++ b/core/modules/parsers/htmlparser.js @@ -6,10 +6,7 @@ module-type: parser The HTML parser displays text as raw HTML \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; var HtmlParser = function(type,text,options) { @@ -34,6 +31,3 @@ var HtmlParser = function(type,text,options) { }; exports["text/html"] = HtmlParser; - -})(); - diff --git a/core/modules/parsers/imageparser.js b/core/modules/parsers/imageparser.js index d594803b29..c7201445fa 100644 --- a/core/modules/parsers/imageparser.js +++ b/core/modules/parsers/imageparser.js @@ -6,10 +6,7 @@ module-type: parser The image parser parses an image into an embeddable HTML element \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; var ImageParser = function(type,text,options) { @@ -43,6 +40,3 @@ exports["image/heif"] = ImageParser; exports["image/avif"] = ImageParser; exports["image/x-icon"] = ImageParser; exports["image/vnd.microsoft.icon"] = ImageParser; - -})(); - diff --git a/core/modules/parsers/parseutils.js b/core/modules/parsers/parseutils.js index 2a2e363094..30bc395095 100644 --- a/core/modules/parsers/parseutils.js +++ b/core/modules/parsers/parseutils.js @@ -22,10 +22,7 @@ Most functions have the following pattern: The exception is `skipWhiteSpace`, which just returns the position after the whitespace. \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; /* @@ -384,5 +381,3 @@ exports.parseAttribute = function(source,pos) { node.end = pos; return node; }; - -})(); diff --git a/core/modules/parsers/pdfparser.js b/core/modules/parsers/pdfparser.js index c7830bf697..0551e93faf 100644 --- a/core/modules/parsers/pdfparser.js +++ b/core/modules/parsers/pdfparser.js @@ -6,10 +6,7 @@ module-type: parser The PDF parser embeds a PDF viewer \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; var ImageParser = function(type,text,options) { @@ -30,6 +27,3 @@ var ImageParser = function(type,text,options) { }; exports["application/pdf"] = ImageParser; - -})(); - diff --git a/core/modules/parsers/textparser.js b/core/modules/parsers/textparser.js index 17f9bde106..ca97404ac4 100644 --- a/core/modules/parsers/textparser.js +++ b/core/modules/parsers/textparser.js @@ -6,10 +6,7 @@ module-type: parser The plain text parser processes blocks of source text into a degenerate parse tree consisting of a single text node \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; var TextParser = function(type,text,options) { @@ -32,5 +29,3 @@ exports["application/javascript"] = TextParser; exports["application/json"] = TextParser; exports["text/css"] = TextParser; exports["application/x-tiddler-dictionary"] = TextParser; - -})(); diff --git a/core/modules/parsers/videoparser.js b/core/modules/parsers/videoparser.js index 1c8a38bb27..e4406e56ad 100644 --- a/core/modules/parsers/videoparser.js +++ b/core/modules/parsers/videoparser.js @@ -6,10 +6,7 @@ module-type: parser The video parser parses a video tiddler into an embeddable HTML element \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; var VideoParser = function(type,text,options) { @@ -36,5 +33,3 @@ exports["video/ogg"] = VideoParser; exports["video/webm"] = VideoParser; exports["video/mp4"] = VideoParser; exports["video/quicktime"] = VideoParser; - -})(); diff --git a/core/modules/parsers/wikiparser/rules/codeblock.js b/core/modules/parsers/wikiparser/rules/codeblock.js index 6c3480566b..bdecd65be5 100644 --- a/core/modules/parsers/wikiparser/rules/codeblock.js +++ b/core/modules/parsers/wikiparser/rules/codeblock.js @@ -12,10 +12,7 @@ Wiki text rule for code blocks. For example: ``` \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; exports.name = "codeblock"; @@ -56,5 +53,3 @@ exports.parse = function() { } }]; }; - -})(); diff --git a/core/modules/parsers/wikiparser/rules/codeinline.js b/core/modules/parsers/wikiparser/rules/codeinline.js index 048fc051c0..5606ba478c 100644 --- a/core/modules/parsers/wikiparser/rules/codeinline.js +++ b/core/modules/parsers/wikiparser/rules/codeinline.js @@ -11,10 +11,7 @@ Wiki text inline rule for code runs. For example: ``` \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; exports.name = "codeinline"; @@ -54,5 +51,3 @@ exports.parse = function() { }] }]; }; - -})(); diff --git a/core/modules/parsers/wikiparser/rules/commentblock.js b/core/modules/parsers/wikiparser/rules/commentblock.js index 1c303f38f8..96d3deb3dc 100644 --- a/core/modules/parsers/wikiparser/rules/commentblock.js +++ b/core/modules/parsers/wikiparser/rules/commentblock.js @@ -18,10 +18,7 @@ xxxx Note that the syntax for comments is simplified to an opening "" sequence -- HTML itself implements a more complex format (see http://ostermiller.org/findhtmlcomment.html) \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; exports.name = "commentblock"; @@ -52,5 +49,3 @@ exports.parse = function() { // Don't return any elements return []; }; - -})(); diff --git a/core/modules/parsers/wikiparser/rules/commentinline.js b/core/modules/parsers/wikiparser/rules/commentinline.js index 671bd79d65..e826b95e62 100644 --- a/core/modules/parsers/wikiparser/rules/commentinline.js +++ b/core/modules/parsers/wikiparser/rules/commentinline.js @@ -12,10 +12,7 @@ Wiki text inline rule for HTML comments. For example: Note that the syntax for comments is simplified to an opening "" sequence -- HTML itself implements a more complex format (see http://ostermiller.org/findhtmlcomment.html) \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; exports.name = "commentinline"; @@ -46,5 +43,3 @@ exports.parse = function() { // Don't return any elements return []; }; - -})(); diff --git a/core/modules/parsers/wikiparser/rules/conditional.js b/core/modules/parsers/wikiparser/rules/conditional.js index c2d6a43b85..4dccf75fbf 100644 --- a/core/modules/parsers/wikiparser/rules/conditional.js +++ b/core/modules/parsers/wikiparser/rules/conditional.js @@ -11,9 +11,6 @@ This is a <%if [{something}] %>Elephant<%elseif [{else}] %>Pelican<%else%>Crocod \*/ (function(){ - -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; exports.name = "conditional"; diff --git a/core/modules/parsers/wikiparser/rules/dash.js b/core/modules/parsers/wikiparser/rules/dash.js index 45481bf07b..02d82baec6 100644 --- a/core/modules/parsers/wikiparser/rules/dash.js +++ b/core/modules/parsers/wikiparser/rules/dash.js @@ -12,10 +12,7 @@ This is an em-dash: --- ``` \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; exports.name = "dash"; @@ -36,5 +33,3 @@ exports.parse = function() { entity: dash }]; }; - -})(); diff --git a/core/modules/parsers/wikiparser/rules/emphasis/bold.js b/core/modules/parsers/wikiparser/rules/emphasis/bold.js index 3799feeb5a..70f741759f 100644 --- a/core/modules/parsers/wikiparser/rules/emphasis/bold.js +++ b/core/modules/parsers/wikiparser/rules/emphasis/bold.js @@ -17,10 +17,7 @@ This wikiparser can be modified using the rules eg: ``` \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; exports.name = "bold"; @@ -46,5 +43,3 @@ exports.parse = function() { children: tree }]; }; - -})(); \ No newline at end of file diff --git a/core/modules/parsers/wikiparser/rules/emphasis/italic.js b/core/modules/parsers/wikiparser/rules/emphasis/italic.js index 3e0744c4da..995e581232 100644 --- a/core/modules/parsers/wikiparser/rules/emphasis/italic.js +++ b/core/modules/parsers/wikiparser/rules/emphasis/italic.js @@ -17,10 +17,7 @@ This wikiparser can be modified using the rules eg: ``` \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; exports.name = "italic"; @@ -46,5 +43,3 @@ exports.parse = function() { children: tree }]; }; - -})(); \ No newline at end of file diff --git a/core/modules/parsers/wikiparser/rules/emphasis/strikethrough.js b/core/modules/parsers/wikiparser/rules/emphasis/strikethrough.js index 0fb34fc526..24380ed115 100644 --- a/core/modules/parsers/wikiparser/rules/emphasis/strikethrough.js +++ b/core/modules/parsers/wikiparser/rules/emphasis/strikethrough.js @@ -17,10 +17,7 @@ This wikiparser can be modified using the rules eg: ``` \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; exports.name = "strikethrough"; @@ -46,5 +43,3 @@ exports.parse = function() { children: tree }]; }; - -})(); diff --git a/core/modules/parsers/wikiparser/rules/emphasis/subscript.js b/core/modules/parsers/wikiparser/rules/emphasis/subscript.js index 12be0fbbc4..104ed0294a 100644 --- a/core/modules/parsers/wikiparser/rules/emphasis/subscript.js +++ b/core/modules/parsers/wikiparser/rules/emphasis/subscript.js @@ -17,10 +17,7 @@ This wikiparser can be modified using the rules eg: ``` \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; exports.name = "subscript"; @@ -46,5 +43,3 @@ exports.parse = function() { children: tree }]; }; - -})(); diff --git a/core/modules/parsers/wikiparser/rules/emphasis/superscript.js b/core/modules/parsers/wikiparser/rules/emphasis/superscript.js index 5a5330d8c6..be71572557 100644 --- a/core/modules/parsers/wikiparser/rules/emphasis/superscript.js +++ b/core/modules/parsers/wikiparser/rules/emphasis/superscript.js @@ -17,10 +17,7 @@ This wikiparser can be modified using the rules eg: ``` \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; exports.name = "superscript"; @@ -46,5 +43,3 @@ exports.parse = function() { children: tree }]; }; - -})(); \ No newline at end of file diff --git a/core/modules/parsers/wikiparser/rules/emphasis/underscore.js b/core/modules/parsers/wikiparser/rules/emphasis/underscore.js index d36bd242d7..2c2bf71c32 100644 --- a/core/modules/parsers/wikiparser/rules/emphasis/underscore.js +++ b/core/modules/parsers/wikiparser/rules/emphasis/underscore.js @@ -17,10 +17,7 @@ This wikiparser can be modified using the rules eg: ``` \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; exports.name = "underscore"; @@ -46,5 +43,3 @@ exports.parse = function() { children: tree }]; }; - -})(); \ No newline at end of file diff --git a/core/modules/parsers/wikiparser/rules/entity.js b/core/modules/parsers/wikiparser/rules/entity.js index dc3917dafc..df2068b788 100644 --- a/core/modules/parsers/wikiparser/rules/entity.js +++ b/core/modules/parsers/wikiparser/rules/entity.js @@ -10,10 +10,7 @@ Wiki text inline rule for HTML entities. For example: ``` \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; exports.name = "entity"; @@ -36,5 +33,3 @@ exports.parse = function() { // Return the entity return [{type: "entity", entity: this.match[0]}]; }; - -})(); diff --git a/core/modules/parsers/wikiparser/rules/extlink.js b/core/modules/parsers/wikiparser/rules/extlink.js index 5b9f57adf0..2678e38735 100644 --- a/core/modules/parsers/wikiparser/rules/extlink.js +++ b/core/modules/parsers/wikiparser/rules/extlink.js @@ -14,10 +14,7 @@ A suppressed external link: ~http://www.tiddlyspace.com/ External links can be suppressed by preceding them with `~`. \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; exports.name = "extlink"; @@ -52,5 +49,3 @@ exports.parse = function() { }]; } }; - -})(); diff --git a/core/modules/parsers/wikiparser/rules/filteredtranscludeblock.js b/core/modules/parsers/wikiparser/rules/filteredtranscludeblock.js index 73bdff813d..2fd96183e0 100644 --- a/core/modules/parsers/wikiparser/rules/filteredtranscludeblock.js +++ b/core/modules/parsers/wikiparser/rules/filteredtranscludeblock.js @@ -14,10 +14,7 @@ Wiki text rule for block-level filtered transclusion. For example: ``` \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; exports.name = "filteredtranscludeblock"; @@ -70,5 +67,3 @@ exports.parse = function() { } return [node]; }; - -})(); diff --git a/core/modules/parsers/wikiparser/rules/filteredtranscludeinline.js b/core/modules/parsers/wikiparser/rules/filteredtranscludeinline.js index c0b19a941e..ee82ff5171 100644 --- a/core/modules/parsers/wikiparser/rules/filteredtranscludeinline.js +++ b/core/modules/parsers/wikiparser/rules/filteredtranscludeinline.js @@ -14,10 +14,7 @@ Wiki text rule for inline filtered transclusion. For example: ``` \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; exports.name = "filteredtranscludeinline"; @@ -69,5 +66,3 @@ exports.parse = function() { } return [node]; }; - -})(); diff --git a/core/modules/parsers/wikiparser/rules/fnprocdef.js b/core/modules/parsers/wikiparser/rules/fnprocdef.js index 85bd14d5c6..8e675a3d1d 100644 --- a/core/modules/parsers/wikiparser/rules/fnprocdef.js +++ b/core/modules/parsers/wikiparser/rules/fnprocdef.js @@ -20,10 +20,7 @@ definition text ``` \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; exports.name = "fnprocdef"; @@ -92,6 +89,3 @@ exports.parse = function() { } return parseTreeNodes; }; - -})(); - \ No newline at end of file diff --git a/core/modules/parsers/wikiparser/rules/hardlinebreaks.js b/core/modules/parsers/wikiparser/rules/hardlinebreaks.js index 94f517cd47..da28f78084 100644 --- a/core/modules/parsers/wikiparser/rules/hardlinebreaks.js +++ b/core/modules/parsers/wikiparser/rules/hardlinebreaks.js @@ -17,10 +17,7 @@ Not ``` \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; exports.name = "hardlinebreaks"; @@ -56,5 +53,3 @@ exports.parse = function() { // Return the nodes return tree; }; - -})(); diff --git a/core/modules/parsers/wikiparser/rules/heading.js b/core/modules/parsers/wikiparser/rules/heading.js index 7a0ecb9db9..af2a6ad125 100644 --- a/core/modules/parsers/wikiparser/rules/heading.js +++ b/core/modules/parsers/wikiparser/rules/heading.js @@ -6,10 +6,7 @@ module-type: wikirule Wiki text block rule for headings \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; exports.name = "heading"; @@ -45,4 +42,3 @@ exports.parse = function() { children: tree }]; }; -})(); diff --git a/core/modules/parsers/wikiparser/rules/horizrule.js b/core/modules/parsers/wikiparser/rules/horizrule.js index bacad06ed9..2294add6bc 100644 --- a/core/modules/parsers/wikiparser/rules/horizrule.js +++ b/core/modules/parsers/wikiparser/rules/horizrule.js @@ -10,10 +10,7 @@ Wiki text block rule for rules. For example: ``` \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; exports.name = "horizrule"; @@ -30,5 +27,3 @@ exports.parse = function() { this.parser.pos = this.matchRegExp.lastIndex; return [{type: "element", tag: "hr"}]; }; - -})(); diff --git a/core/modules/parsers/wikiparser/rules/html.js b/core/modules/parsers/wikiparser/rules/html.js index 61c4ad9e1e..c5f0e86c56 100644 --- a/core/modules/parsers/wikiparser/rules/html.js +++ b/core/modules/parsers/wikiparser/rules/html.js @@ -17,10 +17,7 @@ This is a widget invocation }}} \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; exports.name = "html"; @@ -194,5 +191,3 @@ exports.isLegalTag = function(tag) { return true; } }; - -})(); diff --git a/core/modules/parsers/wikiparser/rules/image.js b/core/modules/parsers/wikiparser/rules/image.js index 6f58225e0c..2bc90b80d3 100644 --- a/core/modules/parsers/wikiparser/rules/image.js +++ b/core/modules/parsers/wikiparser/rules/image.js @@ -17,10 +17,7 @@ Wiki text inline rule for embedding images. For example: Generates the `<$image>` widget. \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; exports.name = "image"; @@ -129,5 +126,3 @@ exports.parseImage = function(source,pos) { node.end = pos; return node; }; - -})(); diff --git a/core/modules/parsers/wikiparser/rules/import.js b/core/modules/parsers/wikiparser/rules/import.js index bb1832255d..52332f0e38 100644 --- a/core/modules/parsers/wikiparser/rules/import.js +++ b/core/modules/parsers/wikiparser/rules/import.js @@ -10,10 +10,7 @@ Wiki pragma rule for importing variable definitions ``` \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; exports.name = "import"; @@ -50,5 +47,3 @@ exports.parse = function() { children: [] }]; }; - -})(); diff --git a/core/modules/parsers/wikiparser/rules/list.js b/core/modules/parsers/wikiparser/rules/list.js index d89c201b9e..98cc5540fc 100644 --- a/core/modules/parsers/wikiparser/rules/list.js +++ b/core/modules/parsers/wikiparser/rules/list.js @@ -40,10 +40,7 @@ A CSS class can be applied to a list item as follows: ``` \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; exports.name = "list"; @@ -152,5 +149,3 @@ exports.parse = function() { // Return the root element of the list return [listStack[0]]; }; - -})(); diff --git a/core/modules/parsers/wikiparser/rules/macrocallblock.js b/core/modules/parsers/wikiparser/rules/macrocallblock.js index a2c10e04ab..3793d563d3 100644 --- a/core/modules/parsers/wikiparser/rules/macrocallblock.js +++ b/core/modules/parsers/wikiparser/rules/macrocallblock.js @@ -10,10 +10,7 @@ Wiki rule for block macro calls ``` \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; exports.name = "macrocallblock"; @@ -52,5 +49,3 @@ exports.parse = function() { this.parser.pos = call.end; return [call]; }; - -})(); diff --git a/core/modules/parsers/wikiparser/rules/macrocallinline.js b/core/modules/parsers/wikiparser/rules/macrocallinline.js index e9f79f09e6..bd6e777bbe 100644 --- a/core/modules/parsers/wikiparser/rules/macrocallinline.js +++ b/core/modules/parsers/wikiparser/rules/macrocallinline.js @@ -10,10 +10,7 @@ Wiki rule for macro calls ``` \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; exports.name = "macrocallinline"; @@ -45,5 +42,3 @@ exports.parse = function() { this.parser.pos = call.end; return [call]; }; - -})(); diff --git a/core/modules/parsers/wikiparser/rules/macrodef.js b/core/modules/parsers/wikiparser/rules/macrodef.js index 2001f70d56..342f5aacd2 100644 --- a/core/modules/parsers/wikiparser/rules/macrodef.js +++ b/core/modules/parsers/wikiparser/rules/macrodef.js @@ -12,10 +12,7 @@ definition text, including $param$ markers ``` \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; exports.name = "macrodef"; @@ -88,5 +85,3 @@ exports.parse = function() { $tw.utils.addAttributeToParseTreeNode(parseTreeNodes[0],"value",text); return parseTreeNodes; }; - -})(); diff --git a/core/modules/parsers/wikiparser/rules/parameters.js b/core/modules/parsers/wikiparser/rules/parameters.js index 60bbd89017..ccd50319c7 100644 --- a/core/modules/parsers/wikiparser/rules/parameters.js +++ b/core/modules/parsers/wikiparser/rules/parameters.js @@ -11,10 +11,7 @@ definition text ``` \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; exports.name = "parameters"; @@ -56,5 +53,3 @@ exports.parse = function() { orderedAttributes: orderedAttributes }]; }; - -})(); diff --git a/core/modules/parsers/wikiparser/rules/parsermode.js b/core/modules/parsers/wikiparser/rules/parsermode.js index 72a6de067c..868db3e151 100644 --- a/core/modules/parsers/wikiparser/rules/parsermode.js +++ b/core/modules/parsers/wikiparser/rules/parsermode.js @@ -11,10 +11,7 @@ Wiki pragma rule for parser mode specifications ``` \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; exports.name = "parsermode"; @@ -64,5 +61,3 @@ exports.parse = function() { // No parse tree nodes to return return []; }; - -})(); diff --git a/core/modules/parsers/wikiparser/rules/prettyextlink.js b/core/modules/parsers/wikiparser/rules/prettyextlink.js index 4707fa0d0a..2c575c2271 100644 --- a/core/modules/parsers/wikiparser/rules/prettyextlink.js +++ b/core/modules/parsers/wikiparser/rules/prettyextlink.js @@ -11,10 +11,7 @@ Wiki text inline rule for external links. For example: ``` \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; exports.name = "prettyextlink"; @@ -116,5 +113,3 @@ exports.parseLink = function(source,pos) { node.end = closePos + 2; return node; }; - -})(); diff --git a/core/modules/parsers/wikiparser/rules/prettylink.js b/core/modules/parsers/wikiparser/rules/prettylink.js index 66c19dc886..91579256dc 100644 --- a/core/modules/parsers/wikiparser/rules/prettylink.js +++ b/core/modules/parsers/wikiparser/rules/prettylink.js @@ -12,10 +12,7 @@ Wiki text inline rule for pretty links. For example: ``` \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; exports.name = "prettylink"; @@ -66,5 +63,3 @@ exports.parse = function() { }]; } }; - -})(); diff --git a/core/modules/parsers/wikiparser/rules/quoteblock.js b/core/modules/parsers/wikiparser/rules/quoteblock.js index fdd6c860b7..be8746de42 100644 --- a/core/modules/parsers/wikiparser/rules/quoteblock.js +++ b/core/modules/parsers/wikiparser/rules/quoteblock.js @@ -6,10 +6,7 @@ module-type: wikirule Wiki text rule for quote blocks. \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; exports.name = "quoteblock"; @@ -72,5 +69,3 @@ exports.parse = function() { children: tree }]; }; - -})(); diff --git a/core/modules/parsers/wikiparser/rules/rules.js b/core/modules/parsers/wikiparser/rules/rules.js index 1d0f80f29b..7b37493087 100644 --- a/core/modules/parsers/wikiparser/rules/rules.js +++ b/core/modules/parsers/wikiparser/rules/rules.js @@ -11,10 +11,7 @@ Wiki pragma rule for rules specifications ``` \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; exports.name = "rules"; @@ -60,5 +57,3 @@ exports.parse = function() { // No parse tree nodes to return return []; }; - -})(); diff --git a/core/modules/parsers/wikiparser/rules/styleblock.js b/core/modules/parsers/wikiparser/rules/styleblock.js index 3fcad5bb4a..2abf2fc9e9 100644 --- a/core/modules/parsers/wikiparser/rules/styleblock.js +++ b/core/modules/parsers/wikiparser/rules/styleblock.js @@ -26,10 +26,7 @@ This is a paragraph ``` \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; exports.name = "styleblock"; @@ -69,5 +66,3 @@ exports.parse = function() { } return tree; }; - -})(); diff --git a/core/modules/parsers/wikiparser/rules/styleinline.js b/core/modules/parsers/wikiparser/rules/styleinline.js index 653e48986d..3aea0d266a 100644 --- a/core/modules/parsers/wikiparser/rules/styleinline.js +++ b/core/modules/parsers/wikiparser/rules/styleinline.js @@ -13,10 +13,7 @@ Wiki text inline rule for assigning styles and classes to inline runs. For examp \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; exports.name = "styleinline"; @@ -54,5 +51,3 @@ exports.parse = function() { } return [node]; }; - -})(); diff --git a/core/modules/parsers/wikiparser/rules/syslink.js b/core/modules/parsers/wikiparser/rules/syslink.js index 6bcbee3848..a578502658 100644 --- a/core/modules/parsers/wikiparser/rules/syslink.js +++ b/core/modules/parsers/wikiparser/rules/syslink.js @@ -6,10 +6,7 @@ module-type: wikirule Wiki text inline rule for system tiddler links. Can be suppressed preceding them with `~`. \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; exports.name = "syslink"; @@ -49,5 +46,3 @@ exports.parse = function() { }]; } }; - -})(); diff --git a/core/modules/parsers/wikiparser/rules/table.js b/core/modules/parsers/wikiparser/rules/table.js index fbdbb4f9dc..67def255f4 100644 --- a/core/modules/parsers/wikiparser/rules/table.js +++ b/core/modules/parsers/wikiparser/rules/table.js @@ -6,10 +6,7 @@ module-type: wikirule Wiki text block rule for tables. \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; exports.name = "table"; @@ -187,5 +184,3 @@ exports.parse = function() { } return [table]; }; - -})(); diff --git a/core/modules/parsers/wikiparser/rules/transcludeblock.js b/core/modules/parsers/wikiparser/rules/transcludeblock.js index c033c24409..525113d5d7 100644 --- a/core/modules/parsers/wikiparser/rules/transcludeblock.js +++ b/core/modules/parsers/wikiparser/rules/transcludeblock.js @@ -11,10 +11,7 @@ Wiki text rule for block-level transclusion. For example: ``` \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; exports.name = "transcludeblock"; @@ -85,5 +82,3 @@ exports.parse = function() { } } }; - -})(); diff --git a/core/modules/parsers/wikiparser/rules/transcludeinline.js b/core/modules/parsers/wikiparser/rules/transcludeinline.js index 3ce9dc78e6..4ae58e6175 100644 --- a/core/modules/parsers/wikiparser/rules/transcludeinline.js +++ b/core/modules/parsers/wikiparser/rules/transcludeinline.js @@ -11,10 +11,7 @@ Wiki text rule for inline-level transclusion. For example: ``` \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; exports.name = "transcludeinline"; @@ -83,5 +80,3 @@ exports.parse = function() { } } }; - -})(); diff --git a/core/modules/parsers/wikiparser/rules/typedblock.js b/core/modules/parsers/wikiparser/rules/typedblock.js index 07c88be15f..03fdc8e10c 100644 --- a/core/modules/parsers/wikiparser/rules/typedblock.js +++ b/core/modules/parsers/wikiparser/rules/typedblock.js @@ -22,10 +22,7 @@ $$$ ``` \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; var widget = require("$:/core/modules/widgets/widget.js"); @@ -82,5 +79,3 @@ exports.parse = function() { }]; } }; - -})(); diff --git a/core/modules/parsers/wikiparser/rules/whitespace.js b/core/modules/parsers/wikiparser/rules/whitespace.js index 5fd9d4b833..3be34ee886 100644 --- a/core/modules/parsers/wikiparser/rules/whitespace.js +++ b/core/modules/parsers/wikiparser/rules/whitespace.js @@ -11,10 +11,7 @@ Wiki pragma rule for whitespace specifications ``` \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; exports.name = "whitespace"; @@ -68,5 +65,3 @@ exports.parse = function() { // No parse tree nodes to return return []; }; - -})(); diff --git a/core/modules/parsers/wikiparser/rules/wikilink.js b/core/modules/parsers/wikiparser/rules/wikilink.js index 6b195f9ff9..d706de8a90 100644 --- a/core/modules/parsers/wikiparser/rules/wikilink.js +++ b/core/modules/parsers/wikiparser/rules/wikilink.js @@ -14,10 +14,7 @@ AnotherLink Precede a camel case word with `~` to prevent it from being recognised as a link. \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; exports.name = "wikilink"; @@ -64,5 +61,3 @@ exports.parse = function() { }] }]; }; - -})(); diff --git a/core/modules/parsers/wikiparser/rules/wikilinkprefix.js b/core/modules/parsers/wikiparser/rules/wikilinkprefix.js index 60cb3d992c..c1c5db1f61 100644 --- a/core/modules/parsers/wikiparser/rules/wikilinkprefix.js +++ b/core/modules/parsers/wikiparser/rules/wikilinkprefix.js @@ -10,10 +10,7 @@ Wiki text inline rule for suppressed wiki links. For example: ``` \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; exports.name = "wikilinkprefix"; @@ -36,5 +33,3 @@ exports.parse = function() { // Return the link without unwikilink character as plain text return [{type: "text", text: linkText.substr(1)}]; }; - -})(); diff --git a/core/modules/parsers/wikiparser/wikiparser.js b/core/modules/parsers/wikiparser/wikiparser.js index 854171d197..3d1379fd47 100644 --- a/core/modules/parsers/wikiparser/wikiparser.js +++ b/core/modules/parsers/wikiparser/wikiparser.js @@ -19,10 +19,7 @@ Attributes are stored as hashmaps of the following objects: {type: "macro", macro: } - indirect through a macro invocation \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; /* @@ -495,5 +492,3 @@ WikiParser.prototype.amendRules = function(type,names) { }; exports["text/vnd.tiddlywiki"] = WikiParser; - -})(); diff --git a/core/modules/parsers/wikiparser/wikirulebase.js b/core/modules/parsers/wikiparser/wikirulebase.js index 8aa960ef79..a9d6c748f0 100644 --- a/core/modules/parsers/wikiparser/wikirulebase.js +++ b/core/modules/parsers/wikiparser/wikirulebase.js @@ -6,10 +6,7 @@ module-type: global Base class for wiki parser rules \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; /* @@ -35,5 +32,3 @@ WikiRuleBase.prototype.findNextMatch = function(startPos) { }; exports.WikiRuleBase = WikiRuleBase; - -})(); diff --git a/core/modules/pluginswitcher.js b/core/modules/pluginswitcher.js index 2915de95a7..d89d261d7b 100644 --- a/core/modules/pluginswitcher.js +++ b/core/modules/pluginswitcher.js @@ -6,10 +6,7 @@ module-type: global Manages switching plugins for themes and languages. \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; /* @@ -75,5 +72,3 @@ PluginSwitcher.prototype.switchPlugins = function() { }; exports.PluginSwitcher = PluginSwitcher; - -})(); diff --git a/core/modules/saver-handler.js b/core/modules/saver-handler.js index e760fd8f18..7f4e834a0d 100644 --- a/core/modules/saver-handler.js +++ b/core/modules/saver-handler.js @@ -6,10 +6,7 @@ module-type: global The saver handler tracks changes to the store and handles saving the entire wiki via saver modules. \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; /* @@ -214,5 +211,3 @@ SaverHandler.prototype.updateDirtyStatus = function() { }; exports.SaverHandler = SaverHandler; - -})(); diff --git a/core/modules/savers/andtidwiki.js b/core/modules/savers/andtidwiki.js index 9ab405e372..5ce4dbe0ea 100644 --- a/core/modules/savers/andtidwiki.js +++ b/core/modules/savers/andtidwiki.js @@ -6,10 +6,8 @@ module-type: saver Handles saving changes via the AndTidWiki Android app \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false, netscape: false, Components: false */ + "use strict"; var AndTidWiki = function(wiki) { @@ -86,5 +84,3 @@ Create an instance of this saver exports.create = function(wiki) { return new AndTidWiki(wiki); }; - -})(); diff --git a/core/modules/savers/custom.js b/core/modules/savers/custom.js index 8366912049..dc5f917039 100644 --- a/core/modules/savers/custom.js +++ b/core/modules/savers/custom.js @@ -9,10 +9,7 @@ on the parent window (of an iframe). If present, the saver must define and the saver may define priority: number \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; var findSaver = function(window) { @@ -57,4 +54,3 @@ Create an instance of this saver exports.create = function(wiki) { return new CustomSaver(wiki); }; -})(); diff --git a/core/modules/savers/download.js b/core/modules/savers/download.js index 003c332c3e..9d046d24ac 100644 --- a/core/modules/savers/download.js +++ b/core/modules/savers/download.js @@ -6,10 +6,7 @@ module-type: saver Handles saving changes via HTML5's download APIs \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; /* @@ -84,5 +81,3 @@ Create an instance of this saver exports.create = function(wiki) { return new DownloadSaver(wiki); }; - -})(); diff --git a/core/modules/savers/fsosaver.js b/core/modules/savers/fsosaver.js index 37224e42a7..85b56e9565 100644 --- a/core/modules/savers/fsosaver.js +++ b/core/modules/savers/fsosaver.js @@ -9,10 +9,7 @@ Note: Since TiddlyWiki's markup contains the MOTW, the FileSystemObject normally However, if the wiki is loaded as an .HTA file (Windows HTML Applications) then the FSO can be used. \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; /* @@ -70,5 +67,3 @@ Create an instance of this saver exports.create = function(wiki) { return new FSOSaver(wiki); }; - -})(); diff --git a/core/modules/savers/gitea.js b/core/modules/savers/gitea.js index 826719ee91..ef23214c16 100644 --- a/core/modules/savers/gitea.js +++ b/core/modules/savers/gitea.js @@ -6,10 +6,7 @@ module-type: saver Saves wiki by pushing a commit to the gitea \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; /* @@ -132,5 +129,3 @@ Create an instance of this saver exports.create = function(wiki) { return new GiteaSaver(wiki); }; - -})(); diff --git a/core/modules/savers/github.js b/core/modules/savers/github.js index c0a34f2d64..f0dca48fc6 100644 --- a/core/modules/savers/github.js +++ b/core/modules/savers/github.js @@ -6,10 +6,7 @@ module-type: saver Saves wiki by pushing a commit to the GitHub v3 REST API \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; /* @@ -115,5 +112,3 @@ Create an instance of this saver exports.create = function(wiki) { return new GitHubSaver(wiki); }; - -})(); diff --git a/core/modules/savers/gitlab.js b/core/modules/savers/gitlab.js index 243aab8a57..43305b5783 100644 --- a/core/modules/savers/gitlab.js +++ b/core/modules/savers/gitlab.js @@ -6,10 +6,7 @@ module-type: saver Saves wiki by pushing a commit to the GitLab REST API \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: true */ "use strict"; /* @@ -113,5 +110,3 @@ Create an instance of this saver exports.create = function(wiki) { return new GitLabSaver(wiki); }; - -})(); diff --git a/core/modules/savers/manualdownload.js b/core/modules/savers/manualdownload.js index af9bcd7433..bb3c3c142f 100644 --- a/core/modules/savers/manualdownload.js +++ b/core/modules/savers/manualdownload.js @@ -6,10 +6,7 @@ module-type: saver Handles saving changes via HTML5's download APIs \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; // Title of the tiddler containing the download message @@ -52,5 +49,3 @@ Create an instance of this saver exports.create = function(wiki) { return new ManualDownloadSaver(wiki); }; - -})(); diff --git a/core/modules/savers/msdownload.js b/core/modules/savers/msdownload.js index 6cb55c3348..233fd35712 100644 --- a/core/modules/savers/msdownload.js +++ b/core/modules/savers/msdownload.js @@ -6,10 +6,7 @@ module-type: saver Handles saving changes via window.navigator.msSaveBlob() \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; /* @@ -55,5 +52,3 @@ Create an instance of this saver exports.create = function(wiki) { return new MsDownloadSaver(wiki); }; - -})(); diff --git a/core/modules/savers/put.js b/core/modules/savers/put.js index 69689e6db5..b77cfdfc8a 100644 --- a/core/modules/savers/put.js +++ b/core/modules/savers/put.js @@ -9,10 +9,7 @@ Works with any server which accepts a PUT request to the current URL, such as a WebDAV server. \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; /* @@ -136,5 +133,3 @@ Create an instance of this saver exports.create = function(wiki) { return new PutSaver(wiki); }; - -})(); diff --git a/core/modules/savers/tiddlyfox.js b/core/modules/savers/tiddlyfox.js index 81b373d421..2356e287e5 100644 --- a/core/modules/savers/tiddlyfox.js +++ b/core/modules/savers/tiddlyfox.js @@ -6,10 +6,7 @@ module-type: saver Handles saving changes via the TiddlyFox file extension \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false, netscape: false, Components: false */ "use strict"; var TiddlyFoxSaver = function(wiki) { @@ -82,5 +79,3 @@ Create an instance of this saver exports.create = function(wiki) { return new TiddlyFoxSaver(wiki); }; - -})(); diff --git a/core/modules/savers/tiddlyie.js b/core/modules/savers/tiddlyie.js index d6d49db453..3b380592dc 100644 --- a/core/modules/savers/tiddlyie.js +++ b/core/modules/savers/tiddlyie.js @@ -6,10 +6,7 @@ module-type: saver Handles saving changes via Internet Explorer BHO extenion (TiddlyIE) \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; /* @@ -67,5 +64,3 @@ Create an instance of this saver exports.create = function(wiki) { return new TiddlyIESaver(wiki); }; - -})(); diff --git a/core/modules/savers/twedit.js b/core/modules/savers/twedit.js index ec125bf94d..8aae0c54e7 100644 --- a/core/modules/savers/twedit.js +++ b/core/modules/savers/twedit.js @@ -6,10 +6,7 @@ module-type: saver Handles saving changes via the TWEdit iOS app \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false, netscape: false, Components: false */ "use strict"; var TWEditSaver = function(wiki) { @@ -87,5 +84,3 @@ exports.create = function(wiki) { if($tw.browser) { window.version = {title: "TiddlyWiki"}; } - -})(); diff --git a/core/modules/savers/upload.js b/core/modules/savers/upload.js index ade5450001..7f17d77bde 100644 --- a/core/modules/savers/upload.js +++ b/core/modules/savers/upload.js @@ -8,10 +8,7 @@ Handles saving changes via upload to a server. Designed to be compatible with BidiX's UploadPlugin at http://tiddlywiki.bidix.info/#UploadPlugin \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; /* @@ -107,5 +104,3 @@ Create an instance of this saver exports.create = function(wiki) { return new UploadSaver(wiki); }; - -})(); diff --git a/core/modules/server/authenticators/basic.js b/core/modules/server/authenticators/basic.js index cd528c485f..e67e701f5d 100644 --- a/core/modules/server/authenticators/basic.js +++ b/core/modules/server/authenticators/basic.js @@ -6,10 +6,7 @@ module-type: authenticator Authenticator for WWW basic authentication \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; if($tw.node) { @@ -90,5 +87,3 @@ BasicAuthenticator.prototype.authenticateRequest = function(request,response,sta }; exports.AuthenticatorClass = BasicAuthenticator; - -})(); diff --git a/core/modules/server/authenticators/header.js b/core/modules/server/authenticators/header.js index cc1d6bdaf8..bbcf9a1d42 100644 --- a/core/modules/server/authenticators/header.js +++ b/core/modules/server/authenticators/header.js @@ -6,10 +6,7 @@ module-type: authenticator Authenticator for trusted header authentication \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; function HeaderAuthenticator(server) { @@ -46,4 +43,3 @@ HeaderAuthenticator.prototype.authenticateRequest = function(request,response,st exports.AuthenticatorClass = HeaderAuthenticator; -})(); diff --git a/core/modules/server/routes/delete-tiddler.js b/core/modules/server/routes/delete-tiddler.js index 85b552599e..33cb40d550 100644 --- a/core/modules/server/routes/delete-tiddler.js +++ b/core/modules/server/routes/delete-tiddler.js @@ -6,10 +6,6 @@ module-type: route DELETE /recipes/default/tiddlers/:title \*/ -(function() { - -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; exports.method = "DELETE"; @@ -24,5 +20,3 @@ exports.handler = function(request,response,state) { }); response.end(); }; - -}()); diff --git a/core/modules/server/routes/get-favicon.js b/core/modules/server/routes/get-favicon.js index 39a3911275..8b757b2f7a 100644 --- a/core/modules/server/routes/get-favicon.js +++ b/core/modules/server/routes/get-favicon.js @@ -6,10 +6,6 @@ module-type: route GET /favicon.ico \*/ -(function() { - -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; exports.method = "GET"; @@ -20,5 +16,3 @@ exports.handler = function(request,response,state) { var buffer = state.wiki.getTiddlerText("$:/favicon.ico",""); state.sendResponse(200,{"Content-Type": "image/x-icon"},buffer,"base64"); }; - -}()); diff --git a/core/modules/server/routes/get-file.js b/core/modules/server/routes/get-file.js index 45aa51d34b..39681de4c3 100644 --- a/core/modules/server/routes/get-file.js +++ b/core/modules/server/routes/get-file.js @@ -6,10 +6,6 @@ module-type: route GET /files/:filepath \*/ -(function() { - -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; exports.method = "GET"; @@ -44,5 +40,3 @@ exports.handler = function(request,response,state) { state.sendResponse(404,{"Content-Type": "text/plain"},"File '" + suppliedFilename + "' not found"); } }; - -}()); diff --git a/core/modules/server/routes/get-index.js b/core/modules/server/routes/get-index.js index f2d01f7932..7ba52faf60 100644 --- a/core/modules/server/routes/get-index.js +++ b/core/modules/server/routes/get-index.js @@ -6,10 +6,6 @@ module-type: route GET / \*/ -(function() { - -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; exports.method = "GET"; @@ -23,5 +19,3 @@ exports.handler = function(request,response,state) { }; state.sendResponse(200,responseHeaders,text); }; - -}()); diff --git a/core/modules/server/routes/get-login-basic.js b/core/modules/server/routes/get-login-basic.js index 69d3bf908c..bca3bd18d3 100644 --- a/core/modules/server/routes/get-login-basic.js +++ b/core/modules/server/routes/get-login-basic.js @@ -6,10 +6,6 @@ module-type: route GET /login-basic -- force a Basic Authentication challenge \*/ -(function() { - -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; exports.method = "GET"; @@ -32,5 +28,3 @@ exports.handler = function(request,response,state) { response.end(); } }; - -}()); diff --git a/core/modules/server/routes/get-status.js b/core/modules/server/routes/get-status.js index ac35ee8748..d93c64037f 100644 --- a/core/modules/server/routes/get-status.js +++ b/core/modules/server/routes/get-status.js @@ -6,10 +6,6 @@ module-type: route GET /status \*/ -(function() { - -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; exports.method = "GET"; @@ -29,5 +25,3 @@ exports.handler = function(request,response,state) { }); state.sendResponse(200,{"Content-Type": "application/json"},text,"utf8"); }; - -}()); diff --git a/core/modules/server/routes/get-tiddler-html.js b/core/modules/server/routes/get-tiddler-html.js index ab1570e309..a891ea6e7a 100644 --- a/core/modules/server/routes/get-tiddler-html.js +++ b/core/modules/server/routes/get-tiddler-html.js @@ -6,10 +6,6 @@ module-type: route GET /:title \*/ -(function() { - -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; exports.method = "GET"; @@ -40,5 +36,3 @@ exports.handler = function(request,response,state) { response.end(); } }; - -}()); diff --git a/core/modules/server/routes/get-tiddler.js b/core/modules/server/routes/get-tiddler.js index ae6cfeadc3..58ecb8a43e 100644 --- a/core/modules/server/routes/get-tiddler.js +++ b/core/modules/server/routes/get-tiddler.js @@ -6,10 +6,6 @@ module-type: route GET /recipes/default/tiddlers/:title \*/ -(function() { - -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; exports.method = "GET"; @@ -42,5 +38,3 @@ exports.handler = function(request,response,state) { response.end(); } }; - -}()); diff --git a/core/modules/server/routes/get-tiddlers-json.js b/core/modules/server/routes/get-tiddlers-json.js index 6f3f07f6ad..89f91032ee 100644 --- a/core/modules/server/routes/get-tiddlers-json.js +++ b/core/modules/server/routes/get-tiddlers-json.js @@ -6,10 +6,6 @@ module-type: route GET /recipes/default/tiddlers.json?filter= \*/ -(function() { - -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; var DEFAULT_FILTER = "[all[tiddlers]!is[system]sort[title]]"; @@ -46,5 +42,3 @@ exports.handler = function(request,response,state) { var text = JSON.stringify(tiddlers); state.sendResponse(200,{"Content-Type": "application/json"},text,"utf8"); }; - -}()); diff --git a/core/modules/server/routes/put-tiddler.js b/core/modules/server/routes/put-tiddler.js index ff1bd2737a..74327bd50d 100644 --- a/core/modules/server/routes/put-tiddler.js +++ b/core/modules/server/routes/put-tiddler.js @@ -6,10 +6,6 @@ module-type: route PUT /recipes/default/tiddlers/:title \*/ -(function() { - -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; exports.method = "PUT"; @@ -48,5 +44,3 @@ exports.handler = function(request,response,state) { }); response.end(); }; - -}()); diff --git a/core/modules/server/server.js b/core/modules/server/server.js index d3c98f8fc2..2118e9b503 100644 --- a/core/modules/server/server.js +++ b/core/modules/server/server.js @@ -6,10 +6,7 @@ module-type: library Serve tiddlers over http \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; if($tw.node) { @@ -374,5 +371,3 @@ Server.prototype.listen = function(port,host,prefix) { }; exports.Server = Server; - -})(); diff --git a/core/modules/startup/browser-messaging.js b/core/modules/startup/browser-messaging.js index 733041e451..27ddb19d5a 100644 --- a/core/modules/startup/browser-messaging.js +++ b/core/modules/startup/browser-messaging.js @@ -6,10 +6,7 @@ module-type: startup Browser message handling \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; // Export name and synchronous status @@ -181,5 +178,3 @@ exports.startup = function() { } },false); }; - -})(); diff --git a/core/modules/startup/commands.js b/core/modules/startup/commands.js index bd8b4afb30..3e4e40f450 100644 --- a/core/modules/startup/commands.js +++ b/core/modules/startup/commands.js @@ -6,10 +6,7 @@ module-type: startup Command processing \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; // Export name and synchronous status @@ -33,5 +30,3 @@ exports.startup = function(callback) { ); commander.execute(); }; - -})(); diff --git a/core/modules/startup/favicon.js b/core/modules/startup/favicon.js index 55e7891e23..d1a7c56770 100644 --- a/core/modules/startup/favicon.js +++ b/core/modules/startup/favicon.js @@ -6,10 +6,7 @@ module-type: startup Favicon handling \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; // Export name and synchronous status @@ -39,5 +36,3 @@ function setFavicon() { faviconLink.setAttribute("href",$tw.utils.makeDataUri(tiddler.fields.text,tiddler.fields.type,tiddler.fields._canonical_uri)); } } - -})(); diff --git a/core/modules/startup/info.js b/core/modules/startup/info.js index ed23059301..a5767ed341 100644 --- a/core/modules/startup/info.js +++ b/core/modules/startup/info.js @@ -6,10 +6,7 @@ module-type: startup Initialise $:/info tiddlers via $:/temp/info-plugin pseudo-plugin \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; // Export name and synchronous status @@ -54,5 +51,3 @@ exports.startup = function() { $tw.wiki.registerPluginTiddlers("info",[TITLE_INFO_PLUGIN]); $tw.wiki.unpackPluginTiddlers(); }; - -})(); diff --git a/core/modules/startup/load-modules.js b/core/modules/startup/load-modules.js index 1dc71f7acc..cf0a8232dd 100644 --- a/core/modules/startup/load-modules.js +++ b/core/modules/startup/load-modules.js @@ -6,10 +6,7 @@ module-type: startup Load core modules \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; // Export name and synchronous status @@ -36,5 +33,3 @@ exports.startup = function() { $tw.wiki.initParsers(); $tw.Commander.initCommands(); }; - -})(); diff --git a/core/modules/startup/password.js b/core/modules/startup/password.js index 5e8bd53523..5ea36ee197 100644 --- a/core/modules/startup/password.js +++ b/core/modules/startup/password.js @@ -6,10 +6,7 @@ module-type: startup Password handling \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; // Export name and synchronous status @@ -49,5 +46,3 @@ exports.startup = function() { } }); }; - -})(); diff --git a/core/modules/startup/plugins.js b/core/modules/startup/plugins.js index af354c38e8..3ceda8669e 100644 --- a/core/modules/startup/plugins.js +++ b/core/modules/startup/plugins.js @@ -6,10 +6,7 @@ module-type: startup Startup logic concerned with managing plugins \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; // Export name and synchronous status @@ -82,4 +79,3 @@ exports.startup = function() { }); }; -})(); diff --git a/core/modules/startup/render.js b/core/modules/startup/render.js index 7206a51d02..13cbb03564 100644 --- a/core/modules/startup/render.js +++ b/core/modules/startup/render.js @@ -6,10 +6,7 @@ module-type: startup Title, stylesheet and page rendering \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; // Export name and synchronous status @@ -120,5 +117,3 @@ exports.startup = function() { // Run any post-render startup actions $tw.rootWidget.invokeActionsByTag("$:/tags/StartupAction/PostRender"); }; - -})(); diff --git a/core/modules/startup/rootwidget.js b/core/modules/startup/rootwidget.js index 95e902db65..b30e03e7b8 100644 --- a/core/modules/startup/rootwidget.js +++ b/core/modules/startup/rootwidget.js @@ -6,10 +6,7 @@ module-type: startup Setup the root widget and the core root widget handlers \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; // Export name and synchronous status @@ -128,5 +125,3 @@ exports.startup = function() { }); } }; - -})(); diff --git a/core/modules/startup/startup.js b/core/modules/startup/startup.js index 4013a37ee4..6f78c71b50 100755 --- a/core/modules/startup/startup.js +++ b/core/modules/startup/startup.js @@ -6,10 +6,7 @@ module-type: startup Miscellaneous startup logic for both the client and server. \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; // Export name and synchronous status @@ -148,5 +145,3 @@ exports.startup = function() { $tw.anim = new $tw.utils.Animator(); } }; - -})(); diff --git a/core/modules/startup/story.js b/core/modules/startup/story.js index c58c759c39..a0c8780244 100644 --- a/core/modules/startup/story.js +++ b/core/modules/startup/story.js @@ -6,10 +6,7 @@ module-type: startup Load core modules \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; // Export name and synchronous status @@ -234,5 +231,3 @@ function updateLocationHash(options) { } } } - -})(); diff --git a/core/modules/startup/windows.js b/core/modules/startup/windows.js index 34f45d7a58..8506a9866a 100644 --- a/core/modules/startup/windows.js +++ b/core/modules/startup/windows.js @@ -6,10 +6,7 @@ module-type: startup Setup root widget handlers for the messages concerned with opening external browser windows \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; // Export name and synchronous status @@ -110,5 +107,3 @@ exports.startup = function() { // Close open windows when unloading main window $tw.addUnloadTask(closeAllWindows); }; - -})(); diff --git a/core/modules/story.js b/core/modules/story.js index 16ff5a74a4..4e624bb260 100644 --- a/core/modules/story.js +++ b/core/modules/story.js @@ -6,10 +6,7 @@ module-type: global Lightweight object for managing interactions with the story and history lists. \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; /* @@ -133,6 +130,3 @@ Story.prototype.storyNewTiddler = function(targetTitle) { }; exports.Story = Story; - - -})(); diff --git a/core/modules/storyviews/classic.js b/core/modules/storyviews/classic.js index a85e458c57..c1f1c0e0f1 100644 --- a/core/modules/storyviews/classic.js +++ b/core/modules/storyviews/classic.js @@ -6,10 +6,7 @@ module-type: storyview Views the story as a linear sequence \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; var easing = "cubic-bezier(0.645, 0.045, 0.355, 1)"; // From http://easings.net/#easeInOutCubic @@ -117,5 +114,3 @@ ClassicStoryView.prototype.remove = function(widget) { }; exports.classic = ClassicStoryView; - -})(); diff --git a/core/modules/storyviews/pop.js b/core/modules/storyviews/pop.js index e2634e3d5b..cbf649b184 100644 --- a/core/modules/storyviews/pop.js +++ b/core/modules/storyviews/pop.js @@ -6,10 +6,7 @@ module-type: storyview Animates list insertions and removals \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; var PopStoryView = function(listWidget) { @@ -99,5 +96,3 @@ PopStoryView.prototype.remove = function(widget) { }; exports.pop = PopStoryView; - -})(); diff --git a/core/modules/storyviews/zoomin.js b/core/modules/storyviews/zoomin.js index d02f705e73..e5c5b88a80 100644 --- a/core/modules/storyviews/zoomin.js +++ b/core/modules/storyviews/zoomin.js @@ -6,10 +6,7 @@ module-type: storyview Zooms between individual tiddlers \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; var easing = "cubic-bezier(0.645, 0.045, 0.355, 1)"; // From http://easings.net/#easeInOutCubic @@ -226,5 +223,3 @@ ZoominListView.prototype.logTextNodeRoot = function(node) { }; exports.zoomin = ZoominListView; - -})(); diff --git a/core/modules/syncer.js b/core/modules/syncer.js index f7627e1ac5..f565d0b9f5 100644 --- a/core/modules/syncer.js +++ b/core/modules/syncer.js @@ -6,10 +6,7 @@ module-type: global The syncer tracks changes to the store and synchronises them to a remote data store represented as a "sync adaptor" \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; /* @@ -703,5 +700,3 @@ SyncFromServerTask.prototype.run = function(callback) { }; exports.Syncer = Syncer; - -})(); diff --git a/core/modules/tiddler.js b/core/modules/tiddler.js index d8d67bf77c..d28f90945c 100644 --- a/core/modules/tiddler.js +++ b/core/modules/tiddler.js @@ -6,10 +6,7 @@ module-type: tiddlermethod Extension methods for the $tw.Tiddler object (constructor and methods required at boot time are in boot/boot.js) \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; exports.hasTag = function(tag) { @@ -99,5 +96,3 @@ exports.getFieldDay = function(field) { this.cache.day[field] = day; return day; }; - -})(); diff --git a/core/modules/upgraders/plugins.js b/core/modules/upgraders/plugins.js index 83487aabf3..8f35d50908 100644 --- a/core/modules/upgraders/plugins.js +++ b/core/modules/upgraders/plugins.js @@ -6,10 +6,7 @@ module-type: upgrader Upgrader module that checks that plugins are newer than any already installed version \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; var UPGRADE_LIBRARY_TITLE = "$:/UpgradeLibrary"; @@ -75,5 +72,3 @@ exports.upgrade = function(wiki,titles,tiddlers) { }); return messages; }; - -})(); diff --git a/core/modules/upgraders/system.js b/core/modules/upgraders/system.js index a653a75b18..ae3f76b3c9 100644 --- a/core/modules/upgraders/system.js +++ b/core/modules/upgraders/system.js @@ -6,10 +6,7 @@ module-type: upgrader Upgrader module that suppresses certain system tiddlers that shouldn't be imported \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; var DONT_IMPORT_LIST = ["$:/Import", "$:/build"], @@ -47,5 +44,3 @@ exports.upgrade = function(wiki,titles,tiddlers) { } return messages; }; - -})(); diff --git a/core/modules/upgraders/themetweaks.js b/core/modules/upgraders/themetweaks.js index e411b285ad..616f9008db 100644 --- a/core/modules/upgraders/themetweaks.js +++ b/core/modules/upgraders/themetweaks.js @@ -15,10 +15,7 @@ Now, each tweak is stored in its own separate tiddler. This upgrader copies any values from the old format to the new. The old data tiddlers are not deleted in case they have been used to store additional indexes. \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; var MAPPINGS = { @@ -61,5 +58,3 @@ exports.upgrade = function(wiki,titles,tiddlers) { }); return messages; }; - -})(); diff --git a/core/modules/utils/crypto.js b/core/modules/utils/crypto.js index 8ad0923a46..dc239fbccf 100644 --- a/core/modules/utils/crypto.js +++ b/core/modules/utils/crypto.js @@ -6,10 +6,7 @@ module-type: utils Utility functions related to crypto. \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; /* @@ -90,5 +87,3 @@ exports.decryptStoreAreaInteractive = function(encryptedStoreArea,callback,optio }); } }; - -})(); diff --git a/core/modules/utils/csv.js b/core/modules/utils/csv.js index 68b6471273..177f0c0aca 100644 --- a/core/modules/utils/csv.js +++ b/core/modules/utils/csv.js @@ -6,10 +6,7 @@ module-type: utils A barebones CSV parser \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; var QUOTE = '"'; @@ -120,5 +117,3 @@ exports.parseCsvStringWithHeader = function(text,options) { } return csv; } - -})(); diff --git a/core/modules/utils/dom/animations/slide.js b/core/modules/utils/dom/animations/slide.js index face94960d..2057c44608 100644 --- a/core/modules/utils/dom/animations/slide.js +++ b/core/modules/utils/dom/animations/slide.js @@ -6,10 +6,7 @@ module-type: animation A simple slide animation that varies the height of the element \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; function slideOpen(domNode,options) { @@ -111,5 +108,3 @@ exports.slide = { open: slideOpen, close: slideClosed }; - -})(); diff --git a/core/modules/utils/dom/animator.js b/core/modules/utils/dom/animator.js index f994d9b585..013900975b 100644 --- a/core/modules/utils/dom/animator.js +++ b/core/modules/utils/dom/animator.js @@ -6,10 +6,7 @@ module-type: utils Orchestrates animations and transitions \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; function Animator() { @@ -39,5 +36,3 @@ Animator.prototype.perform = function(type,domNode,options) { }; exports.Animator = Animator; - -})(); diff --git a/core/modules/utils/dom/browser.js b/core/modules/utils/dom/browser.js index fcc292bedd..7501d4154c 100644 --- a/core/modules/utils/dom/browser.js +++ b/core/modules/utils/dom/browser.js @@ -6,10 +6,7 @@ module-type: utils Browser feature detection \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; /* @@ -160,5 +157,3 @@ exports.getFullScreenApis = function() { return result; } }; - -})(); diff --git a/core/modules/utils/dom/dom.js b/core/modules/utils/dom/dom.js index 5f33bbeea9..a5b14ff784 100644 --- a/core/modules/utils/dom/dom.js +++ b/core/modules/utils/dom/dom.js @@ -6,10 +6,7 @@ module-type: utils Various static DOM-related utility functions. \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; var Popup = require("$:/core/modules/utils/dom/popup.js"); @@ -395,5 +392,3 @@ exports.querySelectorAllSafe = function(selector,baseElement) { console.log("Invalid selector: ",selector); } }; - -})(); diff --git a/core/modules/utils/dom/dragndrop.js b/core/modules/utils/dom/dragndrop.js index c7c32cbafd..25a13537c6 100644 --- a/core/modules/utils/dom/dragndrop.js +++ b/core/modules/utils/dom/dragndrop.js @@ -6,10 +6,7 @@ module-type: utils Browser data transfer utilities, used with the clipboard and drag and drop \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; /* @@ -275,5 +272,3 @@ exports.dragEventContainsFiles = function(event) { }; exports.dragEventContainsType = dragEventContainsType; - -})(); diff --git a/core/modules/utils/dom/http.js b/core/modules/utils/dom/http.js index 37a7855a5a..75b82cd77c 100644 --- a/core/modules/utils/dom/http.js +++ b/core/modules/utils/dom/http.js @@ -6,10 +6,7 @@ module-type: utils HTTP support \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; /* @@ -353,5 +350,3 @@ exports.setQueryStringParameter = function(url,paramName,paramValue) { return url; } }; - -})(); diff --git a/core/modules/utils/dom/keyboard.js b/core/modules/utils/dom/keyboard.js index 0ba1af5a07..926753a65c 100644 --- a/core/modules/utils/dom/keyboard.js +++ b/core/modules/utils/dom/keyboard.js @@ -6,10 +6,7 @@ module-type: utils Keyboard utilities; now deprecated. Instead, use $tw.keyboardManager \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; ["parseKeyDescriptor","checkKeyDescriptor"].forEach(function(method) { @@ -21,5 +18,3 @@ Keyboard utilities; now deprecated. Instead, use $tw.keyboardManager } }; }); - -})(); diff --git a/core/modules/utils/dom/modal.js b/core/modules/utils/dom/modal.js index 1e620aa9a7..cd827c3be8 100644 --- a/core/modules/utils/dom/modal.js +++ b/core/modules/utils/dom/modal.js @@ -6,10 +6,7 @@ module-type: utils Modal message mechanism \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; var widget = require("$:/core/modules/widgets/widget.js"); @@ -253,5 +250,3 @@ Modal.prototype.adjustPageClass = function() { }; exports.Modal = Modal; - -})(); diff --git a/core/modules/utils/dom/notifier.js b/core/modules/utils/dom/notifier.js index bf93d451c1..8743b83bef 100644 --- a/core/modules/utils/dom/notifier.js +++ b/core/modules/utils/dom/notifier.js @@ -6,10 +6,7 @@ module-type: utils Notifier mechanism \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; var widget = require("$:/core/modules/widgets/widget.js"); @@ -88,5 +85,3 @@ Notifier.prototype.display = function(title,options) { }; exports.Notifier = Notifier; - -})(); diff --git a/core/modules/utils/dom/popup.js b/core/modules/utils/dom/popup.js index 017e7da8f6..6ed7c4bca2 100644 --- a/core/modules/utils/dom/popup.js +++ b/core/modules/utils/dom/popup.js @@ -6,10 +6,7 @@ module-type: utils Module that creates a $tw.utils.Popup object prototype that manages popups in the browser \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; /* @@ -243,5 +240,3 @@ exports.buildCoordinates = function(prefix,position) { } exports.Popup = Popup; - -})(); diff --git a/core/modules/utils/dom/scroller.js b/core/modules/utils/dom/scroller.js index 905bb27507..84be12c501 100644 --- a/core/modules/utils/dom/scroller.js +++ b/core/modules/utils/dom/scroller.js @@ -6,10 +6,7 @@ module-type: utils Module that creates a $tw.utils.Scroller object prototype that manages scrolling in the browser \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; /* @@ -135,5 +132,3 @@ PageScroller.prototype.scrollSelectorIntoView = function(baseElement,selector,ca }; exports.PageScroller = PageScroller; - -})(); diff --git a/core/modules/utils/edition-info.js b/core/modules/utils/edition-info.js index b9d97f962e..2c525e3cc1 100644 --- a/core/modules/utils/edition-info.js +++ b/core/modules/utils/edition-info.js @@ -6,10 +6,7 @@ module-type: utils-node Information about the available editions \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; var fs = require("fs"), @@ -44,5 +41,3 @@ exports.getEditionInfo = function() { } return editionInfo; }; - -})(); \ No newline at end of file diff --git a/core/modules/utils/escapecss.js b/core/modules/utils/escapecss.js index 5935b034a7..f2248c4458 100644 --- a/core/modules/utils/escapecss.js +++ b/core/modules/utils/escapecss.js @@ -6,12 +6,10 @@ module-type: utils Provides CSS.escape() functionality. \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false, window: false */ "use strict"; +// TODO -- resolve this construction exports.escapeCSS = (function() { // use browser's native CSS.escape() function if available if ($tw.browser && window.CSS && window.CSS.escape) { @@ -100,5 +98,3 @@ exports.escapeCSS = (function() { return result; }; })(); - -})(); diff --git a/core/modules/utils/fakedom.js b/core/modules/utils/fakedom.js index 66f2314e20..764ac84f8e 100755 --- a/core/modules/utils/fakedom.js +++ b/core/modules/utils/fakedom.js @@ -6,10 +6,7 @@ module-type: global A barebones implementation of DOM interfaces needed by the rendering mechanism. \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; // Sequence number used to enable us to track objects for testing @@ -353,5 +350,3 @@ var document = { }; exports.fakeDocument = document; - -})(); diff --git a/core/modules/utils/filesystem.js b/core/modules/utils/filesystem.js index 86001c2915..aa214586a8 100644 --- a/core/modules/utils/filesystem.js +++ b/core/modules/utils/filesystem.js @@ -6,10 +6,7 @@ module-type: utils-node File system utilities \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; var fs = require("fs"), @@ -543,5 +540,3 @@ exports.cleanupTiddlerFiles = function(options,callback) { return callback(null,bootInfo); } }; - -})(); diff --git a/core/modules/utils/linked-list.js b/core/modules/utils/linked-list.js index 917069d162..8d7f446763 100644 --- a/core/modules/utils/linked-list.js +++ b/core/modules/utils/linked-list.js @@ -7,7 +7,8 @@ This is a doubly-linked indexed list intended for manipulation, particularly pushTop, which it does with significantly better performance than an array. \*/ -(function(){ + +"use strict"; function LinkedList() { this.clear(); @@ -204,5 +205,3 @@ LLMap.prototype = { }; exports.LinkedList = LinkedList; - -})(); diff --git a/core/modules/utils/logger.js b/core/modules/utils/logger.js index 1bee046462..da0d669232 100644 --- a/core/modules/utils/logger.js +++ b/core/modules/utils/logger.js @@ -6,10 +6,7 @@ module-type: utils A basic logging implementation \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; var ALERT_TAG = "$:/tags/Alert"; @@ -134,5 +131,3 @@ Logger.prototype.clearAlerts = function() { }; exports.Logger = Logger; - -})(); diff --git a/core/modules/utils/parsetree.js b/core/modules/utils/parsetree.js index a74b8f3f81..410f921818 100644 --- a/core/modules/utils/parsetree.js +++ b/core/modules/utils/parsetree.js @@ -6,10 +6,7 @@ module-type: utils Parse tree utility functions. \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; /* @@ -122,5 +119,3 @@ exports.getParseTreeText = function getParseTreeText(tree) { } return output.join(""); }; - -})(); diff --git a/core/modules/utils/performance.js b/core/modules/utils/performance.js index 8a86d33c72..f8311d9774 100644 --- a/core/modules/utils/performance.js +++ b/core/modules/utils/performance.js @@ -6,10 +6,7 @@ module-type: global Performance measurement. \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; function Performance(enabled) { @@ -87,5 +84,3 @@ Performance.prototype.measure = function(name,fn) { }; exports.Performance = Performance; - -})(); diff --git a/core/modules/utils/pluginmaker.js b/core/modules/utils/pluginmaker.js index e7426d62be..f64bbec85b 100644 --- a/core/modules/utils/pluginmaker.js +++ b/core/modules/utils/pluginmaker.js @@ -6,10 +6,7 @@ module-type: utils A quick and dirty way to pack up plugins within the browser. \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; /* @@ -75,5 +72,3 @@ exports.repackPlugin = function(title,additionalTiddlers,excludeTiddlers) { // Return a heartwarming confirmation return "Plugin " + title + " successfully saved"; }; - -})(); diff --git a/core/modules/utils/repository.js b/core/modules/utils/repository.js index 3aeb4d25a8..359f558b89 100644 --- a/core/modules/utils/repository.js +++ b/core/modules/utils/repository.js @@ -7,9 +7,6 @@ Utilities for working with the TiddlyWiki repository file structure \*/ (function(){ - -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; /* diff --git a/core/modules/utils/transliterate.js b/core/modules/utils/transliterate.js index ce1cbeddb5..37c5502bfc 100644 --- a/core/modules/utils/transliterate.js +++ b/core/modules/utils/transliterate.js @@ -6,10 +6,7 @@ module-type: utils Transliteration static utility functions. \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; /* @@ -928,5 +925,3 @@ exports.transliterateToSafeASCII = function(str) { return exports.transliterationPairs[ch] || "" }); }; - -})(); diff --git a/core/modules/utils/utils.js b/core/modules/utils/utils.js index 234de0c756..a228f91d43 100644 --- a/core/modules/utils/utils.js +++ b/core/modules/utils/utils.js @@ -6,10 +6,7 @@ module-type: utils Various static utility functions. \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; var base64utf8 = require("$:/core/modules/utils/base64-utf8/base64-utf8.module.js"); @@ -1038,5 +1035,3 @@ exports.makeCompareFunction = function(type,options) { }; return (types[type] || types[options.defaultType] || types.number); }; - -})(); diff --git a/core/modules/widgets/action-confirm.js b/core/modules/widgets/action-confirm.js index 68d8c447e4..c2ca39b64c 100644 --- a/core/modules/widgets/action-confirm.js +++ b/core/modules/widgets/action-confirm.js @@ -5,10 +5,7 @@ type: application/javascript module-type: widget \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; var Widget = require("$:/core/modules/widgets/widget.js").widget; @@ -74,5 +71,3 @@ ConfirmWidget.prototype.allowActionPropagation = function() { }; exports["action-confirm"] = ConfirmWidget; - -})(); diff --git a/core/modules/widgets/action-createtiddler.js b/core/modules/widgets/action-createtiddler.js index b49eaad205..d010e64659 100644 --- a/core/modules/widgets/action-createtiddler.js +++ b/core/modules/widgets/action-createtiddler.js @@ -6,10 +6,7 @@ module-type: widget Action widget to create a new tiddler with a unique name and specified fields. \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw:false, require:false, exports:false */ "use strict"; var Widget = require("$:/core/modules/widgets/widget.js").widget; @@ -109,5 +106,3 @@ CreateTiddlerWidget.prototype.invokeAction = function(triggeringWidget,event) { }; exports["action-createtiddler"] = CreateTiddlerWidget; - -})(); diff --git a/core/modules/widgets/action-deletefield.js b/core/modules/widgets/action-deletefield.js index 00f06562dd..fd55e22703 100644 --- a/core/modules/widgets/action-deletefield.js +++ b/core/modules/widgets/action-deletefield.js @@ -6,10 +6,7 @@ module-type: widget Action widget to delete fields of a tiddler. \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; var Widget = require("$:/core/modules/widgets/widget.js").widget; @@ -85,5 +82,3 @@ DeleteFieldWidget.prototype.invokeAction = function(triggeringWidget,event) { }; exports["action-deletefield"] = DeleteFieldWidget; - -})(); diff --git a/core/modules/widgets/action-deletetiddler.js b/core/modules/widgets/action-deletetiddler.js index 816f9f55e1..fa80620b7d 100644 --- a/core/modules/widgets/action-deletetiddler.js +++ b/core/modules/widgets/action-deletetiddler.js @@ -6,10 +6,7 @@ module-type: widget Action widget to delete a tiddler. \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; var Widget = require("$:/core/modules/widgets/widget.js").widget; @@ -69,5 +66,3 @@ DeleteTiddlerWidget.prototype.invokeAction = function(triggeringWidget,event) { }; exports["action-deletetiddler"] = DeleteTiddlerWidget; - -})(); diff --git a/core/modules/widgets/action-listops.js b/core/modules/widgets/action-listops.js index b3d93a6579..29cf9f8def 100644 --- a/core/modules/widgets/action-listops.js +++ b/core/modules/widgets/action-listops.js @@ -6,10 +6,6 @@ module-type: widget Action widget to apply list operations to any tiddler field (defaults to the 'list' field of the current tiddler) \*/ -(function() { - -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; var Widget = require("$:/core/modules/widgets/widget.js").widget; var ActionListopsWidget = function(parseTreeNode, options) { @@ -87,5 +83,3 @@ ActionListopsWidget.prototype.invokeAction = function(triggeringWidget, }; exports["action-listops"] = ActionListopsWidget; - -})(); diff --git a/core/modules/widgets/action-log.js b/core/modules/widgets/action-log.js index 7b1d1e9041..3f8caf0477 100644 --- a/core/modules/widgets/action-log.js +++ b/core/modules/widgets/action-log.js @@ -6,10 +6,7 @@ module-type: widget Action widget to log debug messages \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; var Widget = require("$:/core/modules/widgets/widget.js").widget; @@ -94,5 +91,3 @@ LogWidget.prototype.log = function() { } exports["action-log"] = LogWidget; - -})(); diff --git a/core/modules/widgets/action-navigate.js b/core/modules/widgets/action-navigate.js index 2df6a011fd..67c7713db5 100644 --- a/core/modules/widgets/action-navigate.js +++ b/core/modules/widgets/action-navigate.js @@ -6,10 +6,7 @@ module-type: widget Action widget to navigate to a tiddler \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; var Widget = require("$:/core/modules/widgets/widget.js").widget; @@ -87,5 +84,3 @@ NavigateWidget.prototype.invokeAction = function(triggeringWidget,event) { }; exports["action-navigate"] = NavigateWidget; - -})(); diff --git a/core/modules/widgets/action-popup.js b/core/modules/widgets/action-popup.js index a3ce20165f..b44b3a5248 100644 --- a/core/modules/widgets/action-popup.js +++ b/core/modules/widgets/action-popup.js @@ -6,10 +6,7 @@ module-type: widget Action widget to trigger a popup. \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; var Widget = require("$:/core/modules/widgets/widget.js").widget; @@ -81,5 +78,3 @@ ActionPopupWidget.prototype.invokeAction = function(triggeringWidget,event) { }; exports["action-popup"] = ActionPopupWidget; - -})(); diff --git a/core/modules/widgets/action-sendmessage.js b/core/modules/widgets/action-sendmessage.js index d1e800c918..7b9e6453f1 100644 --- a/core/modules/widgets/action-sendmessage.js +++ b/core/modules/widgets/action-sendmessage.js @@ -6,10 +6,7 @@ module-type: widget Action widget to send a message \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; var Widget = require("$:/core/modules/widgets/widget.js").widget; @@ -95,5 +92,3 @@ SendMessageWidget.prototype.invokeAction = function(triggeringWidget,event) { }; exports["action-sendmessage"] = SendMessageWidget; - -})(); diff --git a/core/modules/widgets/action-setfield.js b/core/modules/widgets/action-setfield.js index f853484cd3..2d2c6ce47f 100644 --- a/core/modules/widgets/action-setfield.js +++ b/core/modules/widgets/action-setfield.js @@ -6,10 +6,7 @@ module-type: widget Action widget to set a single field or index on a tiddler. \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; var Widget = require("$:/core/modules/widgets/widget.js").widget; @@ -71,5 +68,3 @@ SetFieldWidget.prototype.invokeAction = function(triggeringWidget,event) { }; exports["action-setfield"] = SetFieldWidget; - -})(); diff --git a/core/modules/widgets/action-setmultiplefields.js b/core/modules/widgets/action-setmultiplefields.js index 174c72889b..1e2326394d 100644 --- a/core/modules/widgets/action-setmultiplefields.js +++ b/core/modules/widgets/action-setmultiplefields.js @@ -6,10 +6,7 @@ module-type: widget Action widget to set multiple fields or indexes on a tiddler \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; var Widget = require("$:/core/modules/widgets/widget.js").widget; @@ -81,6 +78,3 @@ SetMultipleFieldsWidget.prototype.invokeAction = function(triggeringWidget,event }; exports["action-setmultiplefields"] = SetMultipleFieldsWidget; - -})(); - \ No newline at end of file diff --git a/core/modules/widgets/browse.js b/core/modules/widgets/browse.js index d3fc6f0029..b0173f6e21 100644 --- a/core/modules/widgets/browse.js +++ b/core/modules/widgets/browse.js @@ -6,10 +6,7 @@ module-type: widget Browse widget for browsing for files to import \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; var Widget = require("$:/core/modules/widgets/widget.js").widget; @@ -117,5 +114,3 @@ BrowseWidget.prototype.refresh = function(changedTiddlers) { }; exports.browse = BrowseWidget; - -})(); diff --git a/core/modules/widgets/button.js b/core/modules/widgets/button.js index aef0fe6309..68f2fcd119 100644 --- a/core/modules/widgets/button.js +++ b/core/modules/widgets/button.js @@ -6,10 +6,7 @@ module-type: widget Button widget \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; var Widget = require("$:/core/modules/widgets/widget.js").widget; @@ -279,5 +276,3 @@ ButtonWidget.prototype.refresh = function(changedTiddlers) { }; exports.button = ButtonWidget; - -})(); diff --git a/core/modules/widgets/checkbox.js b/core/modules/widgets/checkbox.js index 9d3a074148..7fe62fb42a 100644 --- a/core/modules/widgets/checkbox.js +++ b/core/modules/widgets/checkbox.js @@ -6,10 +6,7 @@ module-type: widget Checkbox widget \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; var Widget = require("$:/core/modules/widgets/widget.js").widget; @@ -344,6 +341,3 @@ CheckboxWidget.prototype.refresh = function(changedTiddlers) { }; exports.checkbox = CheckboxWidget; - -})(); - \ No newline at end of file diff --git a/core/modules/widgets/codeblock.js b/core/modules/widgets/codeblock.js index aa7910cf8e..0c709c8e2a 100644 --- a/core/modules/widgets/codeblock.js +++ b/core/modules/widgets/codeblock.js @@ -6,10 +6,7 @@ module-type: widget Code block node widget \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; var Widget = require("$:/core/modules/widgets/widget.js").widget; @@ -62,5 +59,3 @@ CodeBlockWidget.prototype.refresh = function(changedTiddlers) { }; exports.codeblock = CodeBlockWidget; - -})(); diff --git a/core/modules/widgets/count.js b/core/modules/widgets/count.js index b7ee454524..57acc6fe26 100644 --- a/core/modules/widgets/count.js +++ b/core/modules/widgets/count.js @@ -6,10 +6,7 @@ module-type: widget Count widget \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; var Widget = require("$:/core/modules/widgets/widget.js").widget; @@ -68,5 +65,3 @@ CountWidget.prototype.refresh = function(changedTiddlers) { }; exports.count = CountWidget; - -})(); diff --git a/core/modules/widgets/data.js b/core/modules/widgets/data.js index 5d76f5abd8..d51e2ba8b6 100644 --- a/core/modules/widgets/data.js +++ b/core/modules/widgets/data.js @@ -7,9 +7,6 @@ Widget to dynamically represent one or more tiddlers \*/ (function(){ - -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; var Widget = require("$:/core/modules/widgets/widget.js").widget; diff --git a/core/modules/widgets/diff-text.js b/core/modules/widgets/diff-text.js index 47a47e2595..32cc4f1d82 100644 --- a/core/modules/widgets/diff-text.js +++ b/core/modules/widgets/diff-text.js @@ -6,10 +6,7 @@ module-type: widget Widget to display a diff between two texts \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; var Widget = require("$:/core/modules/widgets/widget.js").widget, @@ -144,5 +141,3 @@ DiffTextWidget.prototype.refresh = function(changedTiddlers) { }; exports["diff-text"] = DiffTextWidget; - -})(); diff --git a/core/modules/widgets/draggable.js b/core/modules/widgets/draggable.js index 97e795ae4a..0bb2fc169a 100644 --- a/core/modules/widgets/draggable.js +++ b/core/modules/widgets/draggable.js @@ -6,10 +6,7 @@ module-type: widget Draggable widget \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; var Widget = require("$:/core/modules/widgets/widget.js").widget; @@ -131,5 +128,3 @@ DraggableWidget.prototype.refresh = function(changedTiddlers) { }; exports.draggable = DraggableWidget; - -})(); diff --git a/core/modules/widgets/droppable.js b/core/modules/widgets/droppable.js index ba54d88600..fe528d08f2 100644 --- a/core/modules/widgets/droppable.js +++ b/core/modules/widgets/droppable.js @@ -6,10 +6,7 @@ module-type: widget Droppable widget \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; var Widget = require("$:/core/modules/widgets/widget.js").widget; @@ -206,5 +203,3 @@ DroppableWidget.prototype.refresh = function(changedTiddlers) { }; exports.droppable = DroppableWidget; - -})(); \ No newline at end of file diff --git a/core/modules/widgets/dropzone.js b/core/modules/widgets/dropzone.js index 043b2557f3..7d7d8b8156 100644 --- a/core/modules/widgets/dropzone.js +++ b/core/modules/widgets/dropzone.js @@ -6,10 +6,7 @@ module-type: widget Dropzone widget \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; var IMPORT_TITLE = "$:/Import"; @@ -328,5 +325,3 @@ DropZoneWidget.prototype.refresh = function(changedTiddlers) { }; exports.dropzone = DropZoneWidget; - -})(); diff --git a/core/modules/widgets/edit-binary.js b/core/modules/widgets/edit-binary.js index a4a18f63d4..bb9581df73 100644 --- a/core/modules/widgets/edit-binary.js +++ b/core/modules/widgets/edit-binary.js @@ -6,10 +6,7 @@ module-type: widget Edit-binary widget; placeholder for editing binary tiddlers \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; var BINARY_WARNING_MESSAGE = "$:/core/ui/BinaryWarning"; @@ -103,5 +100,3 @@ EditBinaryWidget.prototype.refresh = function(changedTiddlers) { }; exports["edit-binary"] = EditBinaryWidget; - -})(); diff --git a/core/modules/widgets/edit-bitmap.js b/core/modules/widgets/edit-bitmap.js index 5065127d89..3065384b3e 100644 --- a/core/modules/widgets/edit-bitmap.js +++ b/core/modules/widgets/edit-bitmap.js @@ -6,10 +6,7 @@ module-type: widget Edit-bitmap widget \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; // Default image sizes @@ -339,5 +336,3 @@ EditBitmapWidget.prototype.saveChanges = function() { }; exports["edit-bitmap"] = EditBitmapWidget; - -})(); diff --git a/core/modules/widgets/edit-shortcut.js b/core/modules/widgets/edit-shortcut.js index 1935b23371..9a45b6ec09 100644 --- a/core/modules/widgets/edit-shortcut.js +++ b/core/modules/widgets/edit-shortcut.js @@ -6,10 +6,7 @@ module-type: widget Widget to display an editable keyboard shortcut \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; var Widget = require("$:/core/modules/widgets/widget.js").widget; @@ -154,5 +151,3 @@ EditShortcutWidget.prototype.refresh = function(changedTiddlers) { }; exports["edit-shortcut"] = EditShortcutWidget; - -})(); diff --git a/core/modules/widgets/edit-text.js b/core/modules/widgets/edit-text.js index bc7b774905..28dc5f79c7 100644 --- a/core/modules/widgets/edit-text.js +++ b/core/modules/widgets/edit-text.js @@ -6,10 +6,7 @@ module-type: widget Edit-text widget \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; var editTextWidgetFactory = require("$:/core/modules/editor/factory.js").editTextWidgetFactory, @@ -17,5 +14,3 @@ var editTextWidgetFactory = require("$:/core/modules/editor/factory.js").editTex SimpleEngine = require("$:/core/modules/editor/engines/simple.js").SimpleEngine; exports["edit-text"] = editTextWidgetFactory(FramedEngine,SimpleEngine); - -})(); diff --git a/core/modules/widgets/edit.js b/core/modules/widgets/edit.js index e4433e1da0..ed2ad0b359 100644 --- a/core/modules/widgets/edit.js +++ b/core/modules/widgets/edit.js @@ -6,10 +6,7 @@ module-type: widget Edit widget is a meta-widget chooses the appropriate actual editting widget \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; var Widget = require("$:/core/modules/widgets/widget.js").widget; @@ -90,5 +87,3 @@ EditWidget.prototype.refresh = function(changedTiddlers) { }; exports.edit = EditWidget; - -})(); diff --git a/core/modules/widgets/element.js b/core/modules/widgets/element.js index 716886e5b0..34fd3b9ffc 100755 --- a/core/modules/widgets/element.js +++ b/core/modules/widgets/element.js @@ -6,10 +6,7 @@ module-type: widget Element widget \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; var Widget = require("$:/core/modules/widgets/widget.js").widget; @@ -101,5 +98,3 @@ ElementWidget.prototype.refresh = function(changedTiddlers) { }; exports.element = ElementWidget; - -})(); diff --git a/core/modules/widgets/encrypt.js b/core/modules/widgets/encrypt.js index 28dfdaf78f..edfbe44299 100644 --- a/core/modules/widgets/encrypt.js +++ b/core/modules/widgets/encrypt.js @@ -6,10 +6,7 @@ module-type: widget Encrypt widget \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; var Widget = require("$:/core/modules/widgets/widget.js").widget; @@ -65,5 +62,3 @@ EncryptWidget.prototype.refresh = function(changedTiddlers) { }; exports.encrypt = EncryptWidget; - -})(); diff --git a/core/modules/widgets/entity.js b/core/modules/widgets/entity.js index 6f1a66fed4..a88f32c3d5 100755 --- a/core/modules/widgets/entity.js +++ b/core/modules/widgets/entity.js @@ -6,10 +6,7 @@ module-type: widget HTML entity widget \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; var Widget = require("$:/core/modules/widgets/widget.js").widget; @@ -56,5 +53,3 @@ EntityWidget.prototype.refresh = function(changedTiddlers) { }; exports.entity = EntityWidget; - -})(); diff --git a/core/modules/widgets/error.js b/core/modules/widgets/error.js index 6a4a607f1c..efbb2cbfbe 100644 --- a/core/modules/widgets/error.js +++ b/core/modules/widgets/error.js @@ -6,10 +6,7 @@ module-type: widget Error widget \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; var Widget = require("$:/core/modules/widgets/widget.js").widget; @@ -59,5 +56,3 @@ ErrorWidget.prototype.refresh = function(changedTiddlers) { }; exports.error = ErrorWidget; - -})(); diff --git a/core/modules/widgets/eventcatcher.js b/core/modules/widgets/eventcatcher.js index dad9503c69..70dc992021 100644 --- a/core/modules/widgets/eventcatcher.js +++ b/core/modules/widgets/eventcatcher.js @@ -6,10 +6,7 @@ module-type: widget Event handler widget \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; var Widget = require("$:/core/modules/widgets/widget.js").widget; @@ -155,5 +152,3 @@ EventWidget.prototype.refresh = function(changedTiddlers) { }; exports.eventcatcher = EventWidget; - -})(); diff --git a/core/modules/widgets/fieldmangler.js b/core/modules/widgets/fieldmangler.js index 5a7e436596..811318e990 100644 --- a/core/modules/widgets/fieldmangler.js +++ b/core/modules/widgets/fieldmangler.js @@ -6,10 +6,7 @@ module-type: widget Field mangler widget \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; var Widget = require("$:/core/modules/widgets/widget.js").widget; @@ -130,5 +127,3 @@ FieldManglerWidget.prototype.handleAddTagEvent = function(event) { }; exports.fieldmangler = FieldManglerWidget; - -})(); diff --git a/core/modules/widgets/fields.js b/core/modules/widgets/fields.js index 0e32443ad7..db558e3b62 100755 --- a/core/modules/widgets/fields.js +++ b/core/modules/widgets/fields.js @@ -6,10 +6,7 @@ module-type: widget Fields widget \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; var Widget = require("$:/core/modules/widgets/widget.js").widget; @@ -110,5 +107,3 @@ FieldsWidget.prototype.refresh = function(changedTiddlers) { }; exports.fields = FieldsWidget; - -})(); diff --git a/core/modules/widgets/fill.js b/core/modules/widgets/fill.js index 870bf7878e..3a93a2b02d 100644 --- a/core/modules/widgets/fill.js +++ b/core/modules/widgets/fill.js @@ -6,10 +6,7 @@ module-type: widget Sub-widget used by the transclude widget for specifying values for slots within transcluded content. It doesn't do anything by itself because the transclude widget only ever deals with the parse tree nodes, and doesn't instantiate the widget itself \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; var Widget = require("$:/core/modules/widgets/widget.js").widget; @@ -29,6 +26,3 @@ FillWidget.prototype.execute = function() { }; exports.fill = FillWidget; - -})(); - \ No newline at end of file diff --git a/core/modules/widgets/genesis.js b/core/modules/widgets/genesis.js index a527553ad2..3084ad2856 100644 --- a/core/modules/widgets/genesis.js +++ b/core/modules/widgets/genesis.js @@ -6,10 +6,7 @@ module-type: widget Genesis widget for dynamically creating widgets \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; var Widget = require("$:/core/modules/widgets/widget.js").widget; @@ -117,5 +114,3 @@ GenesisWidget.prototype.refresh = function(changedTiddlers) { }; exports.genesis = GenesisWidget; - -})(); diff --git a/core/modules/widgets/image.js b/core/modules/widgets/image.js index 52496fd742..a8fddc7892 100644 --- a/core/modules/widgets/image.js +++ b/core/modules/widgets/image.js @@ -22,10 +22,7 @@ Tiddlers that contain wikitext could be rendered to a DIV of the usual size of a The width and height attributes are interpreted as a number of pixels, and do not need to include the "px" suffix. \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; var Widget = require("$:/core/modules/widgets/widget.js").widget; @@ -162,5 +159,3 @@ ImageWidget.prototype.refresh = function(changedTiddlers) { }; exports.image = ImageWidget; - -})(); diff --git a/core/modules/widgets/importvariables.js b/core/modules/widgets/importvariables.js index 3e1ac3fc6f..befee4a908 100644 --- a/core/modules/widgets/importvariables.js +++ b/core/modules/widgets/importvariables.js @@ -6,10 +6,7 @@ module-type: widget Import variable definitions from other tiddlers \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; var Widget = require("$:/core/modules/widgets/widget.js").widget; @@ -132,5 +129,3 @@ ImportVariablesWidget.prototype.refresh = function(changedTiddlers) { }; exports.importvariables = ImportVariablesWidget; - -})(); diff --git a/core/modules/widgets/jsontiddler.js b/core/modules/widgets/jsontiddler.js index 44a9e50e36..8d16ae8625 100644 --- a/core/modules/widgets/jsontiddler.js +++ b/core/modules/widgets/jsontiddler.js @@ -6,10 +6,7 @@ module-type: widget Render a tiddler as JSON text \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; var Widget = require("$:/core/modules/widgets/widget.js").widget; @@ -87,5 +84,3 @@ JSONTiddlerWidget.prototype.getTiddlerFields = function() { }; exports.jsontiddler = JSONTiddlerWidget; - -})(); \ No newline at end of file diff --git a/core/modules/widgets/keyboard.js b/core/modules/widgets/keyboard.js index 9515f5a3b6..f4f6c29069 100644 --- a/core/modules/widgets/keyboard.js +++ b/core/modules/widgets/keyboard.js @@ -6,10 +6,7 @@ module-type: widget Keyboard shortcut widget \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; var Widget = require("$:/core/modules/widgets/widget.js").widget; @@ -135,5 +132,3 @@ KeyboardWidget.prototype.refresh = function(changedTiddlers) { }; exports.keyboard = KeyboardWidget; - -})(); diff --git a/core/modules/widgets/let.js b/core/modules/widgets/let.js index 2b2886530c..3cc09ad94d 100644 --- a/core/modules/widgets/let.js +++ b/core/modules/widgets/let.js @@ -14,10 +14,7 @@ the later variables to depend upon the earlier ones. ``` \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; var Widget = require("$:/core/modules/widgets/widget.js").widget; @@ -92,5 +89,3 @@ LetWidget.prototype.refresh = function(changedTiddlers) { }; exports["let"] = LetWidget; - -})(); diff --git a/core/modules/widgets/link.js b/core/modules/widgets/link.js index f02a7cae21..c8b54818dc 100755 --- a/core/modules/widgets/link.js +++ b/core/modules/widgets/link.js @@ -6,10 +6,7 @@ module-type: widget Link widget \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; var Widget = require("$:/core/modules/widgets/widget.js").widget; @@ -225,6 +222,3 @@ LinkWidget.prototype.refresh = function(changedTiddlers) { }; exports.link = LinkWidget; - -})(); - \ No newline at end of file diff --git a/core/modules/widgets/linkcatcher.js b/core/modules/widgets/linkcatcher.js index 4f4a66b175..d95b523ad6 100644 --- a/core/modules/widgets/linkcatcher.js +++ b/core/modules/widgets/linkcatcher.js @@ -6,10 +6,7 @@ module-type: widget Linkcatcher widget \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; var Widget = require("$:/core/modules/widgets/widget.js").widget; @@ -100,5 +97,3 @@ LinkCatcherWidget.prototype.handleNavigateEvent = function(event) { }; exports.linkcatcher = LinkCatcherWidget; - -})(); diff --git a/core/modules/widgets/list.js b/core/modules/widgets/list.js index d4ad419952..f86d2d5719 100755 --- a/core/modules/widgets/list.js +++ b/core/modules/widgets/list.js @@ -6,10 +6,7 @@ module-type: widget List and list item widgets \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; var Widget = require("$:/core/modules/widgets/widget.js").widget; @@ -523,4 +520,35 @@ ListJoinWidget.prototype.refresh = function() { return false; } exports["list-join"] = ListJoinWidget; -})(); +/* +Make <$list-template> and <$list-empty> widgets that do nothing +*/ +var ListTemplateWidget = function(parseTreeNode,options) { + // Main initialisation inherited from widget.js + this.initialise(parseTreeNode,options); +}; +ListTemplateWidget.prototype = new Widget(); +ListTemplateWidget.prototype.render = function() {} +ListTemplateWidget.prototype.refresh = function() { return false; } + +exports["list-template"] = ListTemplateWidget; + +var ListEmptyWidget = function(parseTreeNode,options) { + // Main initialisation inherited from widget.js + this.initialise(parseTreeNode,options); +}; +ListEmptyWidget.prototype = new Widget(); +ListEmptyWidget.prototype.render = function() {} +ListEmptyWidget.prototype.refresh = function() { return false; } + +exports["list-empty"] = ListEmptyWidget; + +var ListJoinWidget = function(parseTreeNode,options) { + // Main initialisation inherited from widget.js + this.initialise(parseTreeNode,options); +}; +ListJoinWidget.prototype = new Widget(); +ListJoinWidget.prototype.render = function() {} +ListJoinWidget.prototype.refresh = function() { return false; } + +exports["list-join"] = ListJoinWidget; diff --git a/core/modules/widgets/log.js b/core/modules/widgets/log.js index 9d6e95159c..332c79fc2a 100644 --- a/core/modules/widgets/log.js +++ b/core/modules/widgets/log.js @@ -6,10 +6,7 @@ module-type: widget-subclass Widget to log debug messages \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; exports.baseClass = "action-log"; @@ -26,5 +23,3 @@ exports.prototype.render = function(event) { Object.getPrototypeOf(Object.getPrototypeOf(this)).render.call(this,event); Object.getPrototypeOf(Object.getPrototypeOf(this)).log.call(this); } - -})(); \ No newline at end of file diff --git a/core/modules/widgets/macrocall.js b/core/modules/widgets/macrocall.js index 2c4adc3553..75a927a629 100644 --- a/core/modules/widgets/macrocall.js +++ b/core/modules/widgets/macrocall.js @@ -6,10 +6,7 @@ module-type: widget Macrocall widget \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; var Widget = require("$:/core/modules/widgets/widget.js").widget; @@ -87,5 +84,3 @@ MacroCallWidget.prototype.refresh = function(changedTiddlers) { }; exports.macrocall = MacroCallWidget; - -})(); diff --git a/core/modules/widgets/messagecatcher.js b/core/modules/widgets/messagecatcher.js index 1457cd11f4..44cb60f41c 100644 --- a/core/modules/widgets/messagecatcher.js +++ b/core/modules/widgets/messagecatcher.js @@ -6,10 +6,7 @@ module-type: widget Message catcher widget \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; var Widget = require("$:/core/modules/widgets/widget.js").widget; @@ -106,5 +103,3 @@ MessageCatcherWidget.prototype.refresh = function(changedTiddlers) { }; exports.messagecatcher = MessageCatcherWidget; - -})(); diff --git a/core/modules/widgets/navigator.js b/core/modules/widgets/navigator.js index 205db4c917..793bc8416c 100755 --- a/core/modules/widgets/navigator.js +++ b/core/modules/widgets/navigator.js @@ -6,10 +6,7 @@ module-type: widget Navigator widget \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; var IMPORT_TITLE = "$:/Import"; @@ -639,5 +636,3 @@ NavigatorWidget.prototype.handleUnfoldAllTiddlersEvent = function(event) { }; exports.navigator = NavigatorWidget; - -})(); diff --git a/core/modules/widgets/parameters.js b/core/modules/widgets/parameters.js index fdd2cb9637..638db80542 100644 --- a/core/modules/widgets/parameters.js +++ b/core/modules/widgets/parameters.js @@ -6,10 +6,7 @@ module-type: widget Widget for definition of transclusion parameters \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; var Widget = require("$:/core/modules/widgets/widget.js").widget, @@ -104,5 +101,3 @@ ParametersWidget.prototype.refresh = function(changedTiddlers) { }; exports.parameters = ParametersWidget; - -})(); diff --git a/core/modules/widgets/password.js b/core/modules/widgets/password.js index 1d2e4ca69f..59b084940d 100644 --- a/core/modules/widgets/password.js +++ b/core/modules/widgets/password.js @@ -6,10 +6,7 @@ module-type: widget Password widget \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; var Widget = require("$:/core/modules/widgets/widget.js").widget; @@ -78,5 +75,3 @@ PasswordWidget.prototype.refresh = function(changedTiddlers) { }; exports.password = PasswordWidget; - -})(); diff --git a/core/modules/widgets/qualify.js b/core/modules/widgets/qualify.js index 07a5c8b4e2..438d88d65e 100644 --- a/core/modules/widgets/qualify.js +++ b/core/modules/widgets/qualify.js @@ -6,10 +6,7 @@ module-type: widget Qualify text to a variable \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; var Widget = require("$:/core/modules/widgets/widget.js").widget; @@ -62,5 +59,3 @@ QualifyWidget.prototype.refresh = function(changedTiddlers) { }; exports.qualify = QualifyWidget; - -})(); diff --git a/core/modules/widgets/radio.js b/core/modules/widgets/radio.js index 8384552662..4587df65fe 100644 --- a/core/modules/widgets/radio.js +++ b/core/modules/widgets/radio.js @@ -6,10 +6,7 @@ module-type: widget Set a field or index at a given tiddler via radio buttons \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; var Widget = require("$:/core/modules/widgets/widget.js").widget; @@ -138,5 +135,3 @@ RadioWidget.prototype.refresh = function(changedTiddlers) { }; exports.radio = RadioWidget; - -})(); diff --git a/core/modules/widgets/range.js b/core/modules/widgets/range.js index efb935aac9..8d039b1f19 100644 --- a/core/modules/widgets/range.js +++ b/core/modules/widgets/range.js @@ -6,10 +6,7 @@ module-type: widget Range widget \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; var Widget = require("$:/core/modules/widgets/widget.js").widget; @@ -200,5 +197,3 @@ RangeWidget.prototype.refresh = function(changedTiddlers) { }; exports.range = RangeWidget; - -})(); diff --git a/core/modules/widgets/raw.js b/core/modules/widgets/raw.js index 6d0ac41ded..3de52a8929 100644 --- a/core/modules/widgets/raw.js +++ b/core/modules/widgets/raw.js @@ -6,10 +6,7 @@ module-type: widget Raw widget \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; var Widget = require("$:/core/modules/widgets/widget.js").widget; @@ -49,5 +46,3 @@ RawWidget.prototype.refresh = function(changedTiddlers) { }; exports.raw = RawWidget; - -})(); diff --git a/core/modules/widgets/reveal.js b/core/modules/widgets/reveal.js index 3e3510f750..f57f1cf423 100755 --- a/core/modules/widgets/reveal.js +++ b/core/modules/widgets/reveal.js @@ -6,10 +6,7 @@ module-type: widget Reveal widget \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; var Widget = require("$:/core/modules/widgets/widget.js").widget; @@ -275,5 +272,3 @@ RevealWidget.prototype.updateState = function() { }; exports.reveal = RevealWidget; - -})(); diff --git a/core/modules/widgets/scrollable.js b/core/modules/widgets/scrollable.js index 227c455c3b..f34d462e7f 100644 --- a/core/modules/widgets/scrollable.js +++ b/core/modules/widgets/scrollable.js @@ -6,10 +6,7 @@ module-type: widget Scrollable widget \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; var DEBOUNCE_INTERVAL = 100; // Delay after last scroll event before updating the bound tiddler @@ -262,5 +259,3 @@ ScrollableWidget.prototype.refresh = function(changedTiddlers) { }; exports.scrollable = ScrollableWidget; - -})(); diff --git a/core/modules/widgets/select.js b/core/modules/widgets/select.js index f58a118910..8bc23542cc 100644 --- a/core/modules/widgets/select.js +++ b/core/modules/widgets/select.js @@ -16,10 +16,7 @@ Select widget: ``` \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; var Widget = require("$:/core/modules/widgets/widget.js").widget; @@ -209,5 +206,3 @@ SelectWidget.prototype.refresh = function(changedTiddlers) { }; exports.select = SelectWidget; - -})(); diff --git a/core/modules/widgets/setmultiplevariables.js b/core/modules/widgets/setmultiplevariables.js index 41951953e0..c2c3f65de0 100644 --- a/core/modules/widgets/setmultiplevariables.js +++ b/core/modules/widgets/setmultiplevariables.js @@ -6,10 +6,7 @@ module-type: widget Widget to set multiple variables at once from a list of names and a list of values \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; var Widget = require("$:/core/modules/widgets/widget.js").widget; @@ -76,6 +73,3 @@ SetMultipleVariablesWidget.prototype.refresh = function(changedTiddlers) { }; exports["setmultiplevariables"] = SetMultipleVariablesWidget; - -})(); - \ No newline at end of file diff --git a/core/modules/widgets/setvariable.js b/core/modules/widgets/setvariable.js index f8e98f3909..688268a8de 100755 --- a/core/modules/widgets/setvariable.js +++ b/core/modules/widgets/setvariable.js @@ -6,10 +6,7 @@ module-type: widget Set variable widget \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; var Widget = require("$:/core/modules/widgets/widget.js").widget; @@ -122,5 +119,3 @@ SetWidget.prototype.refresh = function(changedTiddlers) { exports.setvariable = SetWidget; exports.set = SetWidget; - -})(); diff --git a/core/modules/widgets/slot.js b/core/modules/widgets/slot.js index eeaaedefe0..37c671c902 100644 --- a/core/modules/widgets/slot.js +++ b/core/modules/widgets/slot.js @@ -6,10 +6,7 @@ module-type: widget Widget for definition of slots within transcluded content. The values provided by the translusion are passed to the slot. \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; var Widget = require("$:/core/modules/widgets/widget.js").widget, @@ -78,5 +75,3 @@ SlotWidget.prototype.refresh = function(changedTiddlers) { }; exports.slot = SlotWidget; - -})(); diff --git a/core/modules/widgets/testcase.js b/core/modules/widgets/testcase.js index ad19052795..cc71418675 100644 --- a/core/modules/widgets/testcase.js +++ b/core/modules/widgets/testcase.js @@ -7,9 +7,6 @@ Widget to display a test case \*/ (function(){ - -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; var Widget = require("$:/core/modules/widgets/widget.js").widget; diff --git a/core/modules/widgets/text.js b/core/modules/widgets/text.js index 14f7291147..a349b55504 100755 --- a/core/modules/widgets/text.js +++ b/core/modules/widgets/text.js @@ -6,10 +6,7 @@ module-type: widget Text node widget \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; var Widget = require("$:/core/modules/widgets/widget.js").widget; @@ -58,5 +55,3 @@ TextNodeWidget.prototype.refresh = function(changedTiddlers) { }; exports.text = TextNodeWidget; - -})(); diff --git a/core/modules/widgets/tiddler.js b/core/modules/widgets/tiddler.js index 0b70ff8753..6c08aac4e9 100755 --- a/core/modules/widgets/tiddler.js +++ b/core/modules/widgets/tiddler.js @@ -6,10 +6,7 @@ module-type: widget Tiddler widget \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; var Widget = require("$:/core/modules/widgets/widget.js").widget; @@ -97,5 +94,3 @@ TiddlerWidget.prototype.refresh = function(changedTiddlers) { }; exports.tiddler = TiddlerWidget; - -})(); diff --git a/core/modules/widgets/transclude.js b/core/modules/widgets/transclude.js index 16561eab64..9bec28b076 100755 --- a/core/modules/widgets/transclude.js +++ b/core/modules/widgets/transclude.js @@ -6,10 +6,7 @@ module-type: widget Transclude widget \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; var Widget = require("$:/core/modules/widgets/widget.js").widget; @@ -485,5 +482,3 @@ TranscludeWidget.prototype.refresh = function(changedTiddlers) { }; exports.transclude = TranscludeWidget; - -})(); diff --git a/core/modules/widgets/vars.js b/core/modules/widgets/vars.js index 42c2b273d0..97edab0417 100644 --- a/core/modules/widgets/vars.js +++ b/core/modules/widgets/vars.js @@ -13,10 +13,7 @@ This widget allows multiple variables to be set in one go: ``` \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; var Widget = require("$:/core/modules/widgets/widget.js").widget; @@ -69,5 +66,3 @@ VarsWidget.prototype.refresh = function(changedTiddlers) { }; exports["vars"] = VarsWidget; - -})(); diff --git a/core/modules/widgets/view.js b/core/modules/widgets/view.js index 070836bffe..e7c808645a 100755 --- a/core/modules/widgets/view.js +++ b/core/modules/widgets/view.js @@ -6,10 +6,7 @@ module-type: widget View widget \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; var Widget = require("$:/core/modules/widgets/widget.js").widget; @@ -224,5 +221,3 @@ ViewWidget.prototype.refresh = function(changedTiddlers) { }; exports.view = ViewWidget; - -})(); diff --git a/core/modules/widgets/widget.js b/core/modules/widgets/widget.js index e2bfb79ca7..b89df34b7c 100755 --- a/core/modules/widgets/widget.js +++ b/core/modules/widgets/widget.js @@ -6,10 +6,7 @@ module-type: widget Widget base class \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; /* @@ -868,5 +865,3 @@ Widget.evaluateVariable = function(widget,name,options) { }; exports.widget = Widget; - -})(); diff --git a/core/modules/widgets/wikify.js b/core/modules/widgets/wikify.js index 1830b20483..18146566b7 100644 --- a/core/modules/widgets/wikify.js +++ b/core/modules/widgets/wikify.js @@ -6,10 +6,7 @@ module-type: widget Widget to wikify text into a variable \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; var Widget = require("$:/core/modules/widgets/widget.js").widget; @@ -153,5 +150,3 @@ WikifyWidget.prototype.refresh = function(changedTiddlers) { }; exports.wikify = WikifyWidget; - -})(); diff --git a/core/modules/wiki-bulkops.js b/core/modules/wiki-bulkops.js index d730b3c2e2..ca7ca4a97c 100644 --- a/core/modules/wiki-bulkops.js +++ b/core/modules/wiki-bulkops.js @@ -6,10 +6,7 @@ module-type: wikimethod Bulk tiddler operations such as rename. \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; /* @@ -84,5 +81,3 @@ function relinkTiddler(fromTitle,toTitle,options) { exports.renameTiddler = renameTiddler; exports.relinkTiddler = relinkTiddler; - -})(); diff --git a/core/modules/wiki.js b/core/modules/wiki.js index 928a2e8470..878b34eb25 100755 --- a/core/modules/wiki.js +++ b/core/modules/wiki.js @@ -16,10 +16,7 @@ Adds the following properties to the wiki object: * `globalCache` is a hashmap by cache name of cache objects that are cleared whenever any tiddler change occurs \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; var widget = require("$:/core/modules/widgets/widget.js"); @@ -1791,5 +1788,3 @@ exports.slugify = function(title,options) { } return slug; }; - -})(); diff --git a/editions/dev/tiddlers/javascript-widget-tutorial/domwidget.js b/editions/dev/tiddlers/javascript-widget-tutorial/domwidget.js index 243839764a..7db98db8c4 100644 --- a/editions/dev/tiddlers/javascript-widget-tutorial/domwidget.js +++ b/editions/dev/tiddlers/javascript-widget-tutorial/domwidget.js @@ -3,10 +3,7 @@ Library function for creating widget using a dom creating function \*/ -(function() { -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; var Widget = require("$:/core/modules/widgets/widget.js").widget; @@ -44,4 +41,3 @@ function createDomWidget(domCreatorFunction) { return MyWidget; } module.exports = createDomWidget; -})(); diff --git a/editions/dev/tiddlers/javascript-widget-tutorial/donothing.js b/editions/dev/tiddlers/javascript-widget-tutorial/donothing.js index b1899b6453..1112e64c3a 100644 --- a/editions/dev/tiddlers/javascript-widget-tutorial/donothing.js +++ b/editions/dev/tiddlers/javascript-widget-tutorial/donothing.js @@ -3,14 +3,9 @@ Do nothing widget \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; var Widget = require("$:/core/modules/widgets/widget.js").widget; exports.donothing = Widget; - -})(); diff --git a/editions/dev/tiddlers/javascript-widget-tutorial/hello-attribute-optimized.js b/editions/dev/tiddlers/javascript-widget-tutorial/hello-attribute-optimized.js index 71cec17624..66418be075 100644 --- a/editions/dev/tiddlers/javascript-widget-tutorial/hello-attribute-optimized.js +++ b/editions/dev/tiddlers/javascript-widget-tutorial/hello-attribute-optimized.js @@ -3,10 +3,6 @@ Hello, World widget \*/ -(function() { - -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; var Widget = require("$:/core/modules/widgets/widget.js").widget; @@ -47,5 +43,3 @@ MyWidget.prototype.refresh = function(changedTiddlers) { }; exports.hello = MyWidget; - -})(); diff --git a/editions/dev/tiddlers/javascript-widget-tutorial/hello-attribute.js b/editions/dev/tiddlers/javascript-widget-tutorial/hello-attribute.js index 3e91aa122d..15ca2534a8 100644 --- a/editions/dev/tiddlers/javascript-widget-tutorial/hello-attribute.js +++ b/editions/dev/tiddlers/javascript-widget-tutorial/hello-attribute.js @@ -3,10 +3,6 @@ Hello, World widget \*/ -(function() { - -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; var Widget = require("$:/core/modules/widgets/widget.js").widget; @@ -43,5 +39,3 @@ MyWidget.prototype.refresh = function(changedTiddlers) { }; exports.hello = MyWidget; - -})(); diff --git a/editions/dev/tiddlers/javascript-widget-tutorial/hello.js b/editions/dev/tiddlers/javascript-widget-tutorial/hello.js index 91afbd8f45..ea159e9cf8 100644 --- a/editions/dev/tiddlers/javascript-widget-tutorial/hello.js +++ b/editions/dev/tiddlers/javascript-widget-tutorial/hello.js @@ -3,10 +3,7 @@ Hello, World widget \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; var Widget = require("$:/core/modules/widgets/widget.js").widget; @@ -31,5 +28,3 @@ MyWidget.prototype.render = function(parent,nextSibling) { }; exports.hello = MyWidget; - -})(); diff --git a/editions/dev/tiddlers/javascript-widget-tutorial/refreshcount.js b/editions/dev/tiddlers/javascript-widget-tutorial/refreshcount.js index b8ee53d89c..1c19e1513b 100644 --- a/editions/dev/tiddlers/javascript-widget-tutorial/refreshcount.js +++ b/editions/dev/tiddlers/javascript-widget-tutorial/refreshcount.js @@ -3,10 +3,6 @@ widget to count the number of times this widget refreshes \*/ -(function() { - -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; var Widget = require("$:/core/modules/widgets/widget.js").widget; @@ -39,5 +35,3 @@ MyWidget.prototype.refresh = function(changedTiddlers) { }; exports.refreshcount = MyWidget; - -})(); diff --git a/editions/dev/tiddlers/javascript-widget-tutorial/tiddlerfield-norefresh.js b/editions/dev/tiddlers/javascript-widget-tutorial/tiddlerfield-norefresh.js index 59f179b5dd..54bc79e2bb 100644 --- a/editions/dev/tiddlers/javascript-widget-tutorial/tiddlerfield-norefresh.js +++ b/editions/dev/tiddlers/javascript-widget-tutorial/tiddlerfield-norefresh.js @@ -3,10 +3,6 @@ Hello, World widget \*/ -(function() { - -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; var Widget = require("$:/core/modules/widgets/widget.js").widget; @@ -32,5 +28,3 @@ MyWidget.prototype.render = function(parent, nextSibling) { }; exports.tiddlerfield = MyWidget; - -})(); diff --git a/editions/dev/tiddlers/javascript-widget-tutorial/tiddlerfield.js b/editions/dev/tiddlers/javascript-widget-tutorial/tiddlerfield.js index c19e84f601..a07c339a37 100644 --- a/editions/dev/tiddlers/javascript-widget-tutorial/tiddlerfield.js +++ b/editions/dev/tiddlers/javascript-widget-tutorial/tiddlerfield.js @@ -3,10 +3,6 @@ Hello, World widget \*/ -(function() { - -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; var Widget = require("$:/core/modules/widgets/widget.js").widget; @@ -42,5 +38,3 @@ MyWidget.prototype.refresh = function(changedTiddlers) { }; exports.tiddlerfield = MyWidget; - -})(); diff --git a/editions/test/tiddlers/tests/modules/utils/test-csv.js b/editions/test/tiddlers/tests/modules/utils/test-csv.js index b53e9b2891..3556235ec7 100644 --- a/editions/test/tiddlers/tests/modules/utils/test-csv.js +++ b/editions/test/tiddlers/tests/modules/utils/test-csv.js @@ -6,9 +6,6 @@ tags: [[$:/tags/test-spec]] Tests the backlinks mechanism. \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; describe('CSV Parsing', function() { @@ -29,5 +26,3 @@ describe('CSV Parsing', function() { }) }); - -})(); diff --git a/editions/test/tiddlers/tests/test-action-widgets.js b/editions/test/tiddlers/tests/test-action-widgets.js index 9d706e1a3b..f8a7ddea02 100644 --- a/editions/test/tiddlers/tests/test-action-widgets.js +++ b/editions/test/tiddlers/tests/test-action-widgets.js @@ -6,7 +6,7 @@ tags: [[$:/tags/test-spec]] Tests the action widgets. \*/ -(function(){ + /* jslint node: true, browser: true */ /* eslint-env node, browser, jasmine */ @@ -94,5 +94,3 @@ it("should handle the action-listops widget", function() { }); -})(); - diff --git a/editions/test/tiddlers/tests/test-backlinks.js b/editions/test/tiddlers/tests/test-backlinks.js index ea7c2b7b4c..c02f9b1c76 100644 --- a/editions/test/tiddlers/tests/test-backlinks.js +++ b/editions/test/tiddlers/tests/test-backlinks.js @@ -6,9 +6,6 @@ tags: [[$:/tags/test-spec]] Tests the backlinks mechanism. \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; describe('Backlinks tests', function() { @@ -141,5 +138,3 @@ describe('Backlinks tests', function() { }); }); }); - -})(); diff --git a/editions/test/tiddlers/tests/test-backtranscludes.js b/editions/test/tiddlers/tests/test-backtranscludes.js index afc09af4e7..52f08d9705 100644 --- a/editions/test/tiddlers/tests/test-backtranscludes.js +++ b/editions/test/tiddlers/tests/test-backtranscludes.js @@ -6,9 +6,6 @@ tags: $:/tags/test-spec Tests the backtranscludes mechanism. \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; describe('Backtranscludes and transclude filter tests', function() { @@ -253,5 +250,3 @@ describe('Backtranscludes and transclude filter tests', function() { }); }); }); - -})(); diff --git a/editions/test/tiddlers/tests/test-checkbox-widget.js b/editions/test/tiddlers/tests/test-checkbox-widget.js index 936f693382..83ed66421f 100644 --- a/editions/test/tiddlers/tests/test-checkbox-widget.js +++ b/editions/test/tiddlers/tests/test-checkbox-widget.js @@ -6,7 +6,7 @@ tags: [[$:/tags/test-spec]] Tests the checkbox widget thoroughly. \*/ -(function(){ + /*jslint node: true, browser: true */ /*global $tw: false */ @@ -575,5 +575,4 @@ Tests the checkbox widget thoroughly. }); -})(); \ No newline at end of file diff --git a/editions/test/tiddlers/tests/test-compare-filter.js b/editions/test/tiddlers/tests/test-compare-filter.js index b146fcc182..1fedf890ca 100644 --- a/editions/test/tiddlers/tests/test-compare-filter.js +++ b/editions/test/tiddlers/tests/test-compare-filter.js @@ -6,7 +6,7 @@ tags: [[$:/tags/test-spec]] Tests the compare filter. \*/ -(function(){ + /* jslint node: true, browser: true */ /* eslint-env node, browser, jasmine */ @@ -81,4 +81,3 @@ describe("'compare' filter tests", function() { }); -})(); diff --git a/editions/test/tiddlers/tests/test-deserialize-operator.js b/editions/test/tiddlers/tests/test-deserialize-operator.js index c629de3ae3..cc465dfbb6 100644 --- a/editions/test/tiddlers/tests/test-deserialize-operator.js +++ b/editions/test/tiddlers/tests/test-deserialize-operator.js @@ -6,7 +6,7 @@ tags: [[$:/tags/test-spec]] Tests deserialize[] filter operator with various core deserializers \*/ -(function(){ + /* jslint node: true, browser: true */ /* eslint-env node, browser, jasmine */ @@ -37,8 +37,4 @@ Tests deserialize[] filter operator with various core deserializers }); }); -})(); - - - \ No newline at end of file diff --git a/editions/test/tiddlers/tests/test-deserializers.js b/editions/test/tiddlers/tests/test-deserializers.js index ae652cdfec..d207debf1a 100644 --- a/editions/test/tiddlers/tests/test-deserializers.js +++ b/editions/test/tiddlers/tests/test-deserializers.js @@ -6,7 +6,6 @@ tags: [[$:/tags/test-spec]] Tests various core deserializers \*/ -(function(){ /* jslint node: true, browser: true */ /* eslint-env node, browser, jasmine */ @@ -34,6 +33,3 @@ Tests various core deserializers executeTestCase("dezerializer test data case 5",[ { title: 'Hello "There"', text: 'Abacus', type: 'text/vnd.tiddlywiki' }, { title: 'Hello "There"', text: 'Calculator'} , { title: 'Hello "There"', text: 'Protractor'} ]); }); - - })(); - \ No newline at end of file diff --git a/editions/test/tiddlers/tests/test-fakedom.js b/editions/test/tiddlers/tests/test-fakedom.js index 7041f017b8..faec01af69 100644 --- a/editions/test/tiddlers/tests/test-fakedom.js +++ b/editions/test/tiddlers/tests/test-fakedom.js @@ -7,9 +7,6 @@ Tests the fakedom that Tiddlywiki occasionally uses. \*/ (function(){ - -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; describe("fakedom tests", function() { diff --git a/editions/test/tiddlers/tests/test-filters.js b/editions/test/tiddlers/tests/test-filters.js index 5626db4f8d..96100e2f7d 100644 --- a/editions/test/tiddlers/tests/test-filters.js +++ b/editions/test/tiddlers/tests/test-filters.js @@ -6,12 +6,7 @@ tags: [[$:/tags/test-spec]] Tests the filtering mechanism. \*/ -(function(){ - /* jslint node: true, browser: true */ - /* eslint-env node, browser, jasmine */ - /* eslint no-mixed-spaces-and-tabs: ["error", "smart-tabs"]*/ - /* global $tw, require */ "use strict"; describe("Filter tests", function() { @@ -1148,5 +1143,3 @@ Tests the filtering mechanism. }); - })(); - diff --git a/editions/test/tiddlers/tests/test-html-parser.js b/editions/test/tiddlers/tests/test-html-parser.js index d2266ca5ee..9fc1082358 100644 --- a/editions/test/tiddlers/tests/test-html-parser.js +++ b/editions/test/tiddlers/tests/test-html-parser.js @@ -6,10 +6,7 @@ tags: [[$:/tags/test-spec]] Tests for the internal components of the HTML tag parser \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; function FakeParser() { @@ -231,5 +228,3 @@ describe("HTML tag new parser tests", function() { }); }); - -})(); diff --git a/editions/test/tiddlers/tests/test-json-filters.js b/editions/test/tiddlers/tests/test-json-filters.js index bfb8a45047..566f77fe29 100644 --- a/editions/test/tiddlers/tests/test-json-filters.js +++ b/editions/test/tiddlers/tests/test-json-filters.js @@ -6,7 +6,7 @@ tags: [[$:/tags/test-spec]] Tests the JSON filters and the format:json operator \*/ -(function(){ + /* jslint node: true, browser: true */ /* eslint-env node, browser, jasmine */ @@ -151,4 +151,3 @@ describe("json filter tests", function() { }); -})(); diff --git a/editions/test/tiddlers/tests/test-linked-list.js b/editions/test/tiddlers/tests/test-linked-list.js index de477257d4..20150bc808 100644 --- a/editions/test/tiddlers/tests/test-linked-list.js +++ b/editions/test/tiddlers/tests/test-linked-list.js @@ -21,10 +21,7 @@ NOTE TO FURTHER LINKED LIST DEVELOPERS: the end. I think you'll probably be better off preventing 'prev' from ever adding undefined. \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; describe("LinkedList class tests", function() { @@ -307,4 +304,3 @@ describe("LinkedList class tests", function() { }); }); -})(); diff --git a/editions/test/tiddlers/tests/test-parsetextreference.js b/editions/test/tiddlers/tests/test-parsetextreference.js index 59f885232d..3c18b90fb1 100644 --- a/editions/test/tiddlers/tests/test-parsetextreference.js +++ b/editions/test/tiddlers/tests/test-parsetextreference.js @@ -6,10 +6,7 @@ tags: [[$:/tags/test-spec]] Tests for source attribute in parser returned from wiki.parseTextReference \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; describe("Wiki.parseTextReference tests", function() { @@ -129,4 +126,3 @@ describe("Wiki.parseTextReference tests", function() { }); -})(); diff --git a/editions/test/tiddlers/tests/test-plugins.js b/editions/test/tiddlers/tests/test-plugins.js index 8e79efe241..fadf92a107 100644 --- a/editions/test/tiddlers/tests/test-plugins.js +++ b/editions/test/tiddlers/tests/test-plugins.js @@ -7,9 +7,6 @@ Tests for integrity of the core plugins, languages, themes and editions \*/ (function(){ - -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; if($tw.node) { diff --git a/editions/test/tiddlers/tests/test-popup.js b/editions/test/tiddlers/tests/test-popup.js index 455da2b9b4..fe6dac2c44 100644 --- a/editions/test/tiddlers/tests/test-popup.js +++ b/editions/test/tiddlers/tests/test-popup.js @@ -6,10 +6,7 @@ tags: [[$:/tags/test-spec]] Tests some utility function of the Popup prototype. \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; describe("Popup tests", function() { @@ -60,4 +57,3 @@ describe("Popup tests", function() { }); }); -})(); diff --git a/editions/test/tiddlers/tests/test-prefixes-filter.js b/editions/test/tiddlers/tests/test-prefixes-filter.js index a8d109d73d..c71d325855 100644 --- a/editions/test/tiddlers/tests/test-prefixes-filter.js +++ b/editions/test/tiddlers/tests/test-prefixes-filter.js @@ -4,7 +4,7 @@ type: application/javascript tags: [[$:/tags/test-spec]] Tests the reduce prefix and filter. \*/ -(function(){ + /* jslint node: true, browser: true */ /* eslint-env node, browser, jasmine */ @@ -459,5 +459,3 @@ describe("'reduce' and 'intersection' filter prefix tests", function() { expect(wiki.filterTiddlers('[tag[shopping]] :reduce[]',anchorWidget).join(",")).toBe(" 0 Brownies, 1 Chick Peas, 2 Milk, 3 Rice Pudding,"); }); }); - -})(); \ No newline at end of file diff --git a/editions/test/tiddlers/tests/test-tags-operator.js b/editions/test/tiddlers/tests/test-tags-operator.js index 87970d1135..4fa0b59632 100644 --- a/editions/test/tiddlers/tests/test-tags-operator.js +++ b/editions/test/tiddlers/tests/test-tags-operator.js @@ -6,8 +6,7 @@ tags: [[$:/tags/test-spec]] Tests the tagging mechanism. \*/ -/*jslint node: true, browser: true */ -/*global $tw: false */ + "use strict"; describe("Tags Operator tests", function() { diff --git a/editions/test/tiddlers/tests/test-tags.js b/editions/test/tiddlers/tests/test-tags.js index 563c39fe57..2032db0394 100644 --- a/editions/test/tiddlers/tests/test-tags.js +++ b/editions/test/tiddlers/tests/test-tags.js @@ -6,10 +6,7 @@ tags: [[$:/tags/test-spec]] Tests the tagging mechanism. \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; describe("Tag tests", function() { @@ -179,4 +176,3 @@ function runTests(wiki,wikiOptions) { }); -})(); diff --git a/editions/test/tiddlers/tests/test-tiddler.js b/editions/test/tiddlers/tests/test-tiddler.js index f85ee9c6ae..070ca98dcd 100644 --- a/editions/test/tiddlers/tests/test-tiddler.js +++ b/editions/test/tiddlers/tests/test-tiddler.js @@ -6,10 +6,7 @@ tags: [[$:/tags/test-spec]] Tests the tiddler object \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; describe("Tiddler tests", function() { @@ -134,4 +131,3 @@ describe("Tiddler tests", function() { }); -})(); diff --git a/editions/test/tiddlers/tests/test-utils.js b/editions/test/tiddlers/tests/test-utils.js index 91ddf86f40..29fa99c01c 100644 --- a/editions/test/tiddlers/tests/test-utils.js +++ b/editions/test/tiddlers/tests/test-utils.js @@ -6,10 +6,7 @@ tags: [[$:/tags/test-spec]] Tests various utility functions. \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; describe("Utility tests", function() { @@ -210,5 +207,3 @@ describe("Utility tests", function() { }); }); - -})(); \ No newline at end of file diff --git a/editions/test/tiddlers/tests/test-widget-getVariableInfo.js b/editions/test/tiddlers/tests/test-widget-getVariableInfo.js index 7273a6dcec..4ce21a9564 100644 --- a/editions/test/tiddlers/tests/test-widget-getVariableInfo.js +++ b/editions/test/tiddlers/tests/test-widget-getVariableInfo.js @@ -7,9 +7,6 @@ Tests the wikitext rendering pipeline end-to-end. We also need tests that indivi \*/ (function(){ - -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; describe("Widget module", function() { diff --git a/editions/test/tiddlers/tests/test-widget.js b/editions/test/tiddlers/tests/test-widget.js index 637104c0bd..7d1cbc329b 100755 --- a/editions/test/tiddlers/tests/test-widget.js +++ b/editions/test/tiddlers/tests/test-widget.js @@ -6,10 +6,7 @@ tags: [[$:/tags/test-spec]] Tests the wikitext rendering pipeline end-to-end. We also need tests that individually test parsers, rendertreenodes etc., but this gets us started. \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; describe("Widget module", function() { @@ -945,4 +942,3 @@ describe("Widget module", function() { }); }); -})(); diff --git a/editions/test/tiddlers/tests/test-wikitext-parser.js b/editions/test/tiddlers/tests/test-wikitext-parser.js index a488ff0306..c35ad1dce7 100644 --- a/editions/test/tiddlers/tests/test-wikitext-parser.js +++ b/editions/test/tiddlers/tests/test-wikitext-parser.js @@ -6,10 +6,7 @@ tags: [[$:/tags/test-spec]] Tests for wikitext parser \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; describe("WikiText parser tests", function() { @@ -420,4 +417,3 @@ describe("WikiText parser tests", function() { }); }); -})(); diff --git a/editions/test/tiddlers/tests/test-wikitext-tabs-macro.js b/editions/test/tiddlers/tests/test-wikitext-tabs-macro.js index 973f6fe66a..16e93d73a0 100644 --- a/editions/test/tiddlers/tests/test-wikitext-tabs-macro.js +++ b/editions/test/tiddlers/tests/test-wikitext-tabs-macro.js @@ -9,10 +9,7 @@ Intended to permit future readability improvements. Adding new functionality will probably change the "expected" html structure. \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; describe("Tabs-macro HTML tests", function() { @@ -81,4 +78,3 @@ describe("Tabs-macro HTML tests", function() { }); }); -})(); diff --git a/editions/test/tiddlers/tests/test-wikitext.js b/editions/test/tiddlers/tests/test-wikitext.js index eddef73f70..c86cb90d76 100644 --- a/editions/test/tiddlers/tests/test-wikitext.js +++ b/editions/test/tiddlers/tests/test-wikitext.js @@ -6,10 +6,7 @@ tags: [[$:/tags/test-spec]] Tests the wikitext rendering pipeline end-to-end. We also need tests that individually test parsers, rendertreenodes etc., but this gets us started. \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; describe("WikiText tests", function() { @@ -71,4 +68,3 @@ describe("WikiText tests", function() { }); }); -})(); diff --git a/editions/tw5.com/tiddlers/system/dropbox-url-macro.js b/editions/tw5.com/tiddlers/system/dropbox-url-macro.js index ac7a306ca8..8cbd904629 100644 --- a/editions/tw5.com/tiddlers/system/dropbox-url-macro.js +++ b/editions/tw5.com/tiddlers/system/dropbox-url-macro.js @@ -12,10 +12,7 @@ Implements the Dropbox URL converter macro. \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; exports.name = "dropbox-url"; @@ -29,4 +26,3 @@ exports.run = function(url) { return "`" + url + "` ([[open|" + url + "]])"; }; -})(); diff --git a/editions/tw5.com/tiddlers/system/if-macro.js b/editions/tw5.com/tiddlers/system/if-macro.js index 6c902ed65d..910b247490 100644 --- a/editions/tw5.com/tiddlers/system/if-macro.js +++ b/editions/tw5.com/tiddlers/system/if-macro.js @@ -3,10 +3,7 @@ title: $:/editions/tw5.com/if-macro.js type: application/javascript module-type: macro \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; exports.name = ".if"; @@ -23,4 +20,3 @@ exports.run = function(cond, then, elze) { return cond ? then : elze; }; -})(); diff --git a/plugins/tiddlywiki/aws/modules/command.js b/plugins/tiddlywiki/aws/modules/command.js index 2846f24d85..50ef266cdc 100644 --- a/plugins/tiddlywiki/aws/modules/command.js +++ b/plugins/tiddlywiki/aws/modules/command.js @@ -6,8 +6,7 @@ module-type: command --aws command \*/ -/*jslint node: true, browser: true */ -/*global $tw: false */ + "use strict"; var async, diff --git a/plugins/tiddlywiki/aws/modules/encodings.js b/plugins/tiddlywiki/aws/modules/encodings.js index cc1068ee68..9594185670 100644 --- a/plugins/tiddlywiki/aws/modules/encodings.js +++ b/plugins/tiddlywiki/aws/modules/encodings.js @@ -6,8 +6,7 @@ module-type: filteroperator Filter operator for applying encodeuricomponent() to each item, with the addition of converting single quotes to %27, as required by AWS \*/ -/*jslint node: true, browser: true */ -/*global $tw: false */ + "use strict"; /* diff --git a/plugins/tiddlywiki/aws/modules/init.js b/plugins/tiddlywiki/aws/modules/init.js index 34db71abe5..325543f55f 100644 --- a/plugins/tiddlywiki/aws/modules/init.js +++ b/plugins/tiddlywiki/aws/modules/init.js @@ -6,8 +6,7 @@ module-type: startup AWS initialisation \*/ -/*jslint node: true, browser: true */ -/*global $tw: false */ + "use strict"; // Export name and synchronous status diff --git a/plugins/tiddlywiki/aws/modules/utils.js b/plugins/tiddlywiki/aws/modules/utils.js index a4b2ccdfb9..b663e179e9 100644 --- a/plugins/tiddlywiki/aws/modules/utils.js +++ b/plugins/tiddlywiki/aws/modules/utils.js @@ -6,8 +6,7 @@ module-type: library AWS utility functions \*/ -/*jslint node: true, browser: true */ -/*global $tw: false */ + "use strict"; /* diff --git a/plugins/tiddlywiki/bibtex/deserializer.js b/plugins/tiddlywiki/bibtex/deserializer.js index 9a87e82fb8..116f055976 100644 --- a/plugins/tiddlywiki/bibtex/deserializer.js +++ b/plugins/tiddlywiki/bibtex/deserializer.js @@ -6,10 +6,7 @@ module-type: tiddlerdeserializer BibTeX file deserializer \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; var bibtexParse = require("$:/plugins/tiddlywiki/bibtex/bibtexParse.js"); @@ -46,5 +43,3 @@ exports["application/x-bibtex"] = function(text,fields) { // Return the output tiddlers return results; }; - -})(); diff --git a/plugins/tiddlywiki/browser-sniff/browser.js b/plugins/tiddlywiki/browser-sniff/browser.js index 26989623a1..31573fa7e1 100644 --- a/plugins/tiddlywiki/browser-sniff/browser.js +++ b/plugins/tiddlywiki/browser-sniff/browser.js @@ -6,10 +6,7 @@ module-type: info Initialise $:/info/browser tiddlers \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; exports.getInfoTiddlerFields = function() { @@ -78,5 +75,3 @@ exports.getInfoTiddlerFields = function() { } return infoTiddlerFields; }; - -})(); diff --git a/plugins/tiddlywiki/browser-storage/rawmarkup.js b/plugins/tiddlywiki/browser-storage/rawmarkup.js index bf7c41e0a2..d94d9d2366 100644 --- a/plugins/tiddlywiki/browser-storage/rawmarkup.js +++ b/plugins/tiddlywiki/browser-storage/rawmarkup.js @@ -7,8 +7,6 @@ Startup code injected as raw markup \*/ -(function() { - // Need to initialise these because we run before bootprefix.js and boot.js $tw = window.$tw || Object.create(null); $tw.hooks = $tw.hooks || { names: {}}; @@ -89,5 +87,3 @@ function hookBootTiddlersLoaded() { text: $tw.utils.stringifyList(log) }); } - -})(); diff --git a/plugins/tiddlywiki/browser-storage/startup.js b/plugins/tiddlywiki/browser-storage/startup.js index 2d72879713..9ab61620d6 100644 --- a/plugins/tiddlywiki/browser-storage/startup.js +++ b/plugins/tiddlywiki/browser-storage/startup.js @@ -6,10 +6,7 @@ module-type: startup Startup initialisation \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; // Export name and synchronous status @@ -135,5 +132,3 @@ exports.startup = function() { }); }); }; - -})(); diff --git a/plugins/tiddlywiki/browser-storage/util.js b/plugins/tiddlywiki/browser-storage/util.js index 0f55ada7da..5cdcfa3984 100644 --- a/plugins/tiddlywiki/browser-storage/util.js +++ b/plugins/tiddlywiki/browser-storage/util.js @@ -7,10 +7,6 @@ Utility methods for browser-storage plugin \*/ -(function(){ - -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; function BrowserStorageUtil(wiki,options) { @@ -109,5 +105,3 @@ BrowserStorageUtil.prototype.clearLocalStorage = function() { }; exports.BrowserStorageUtil = BrowserStorageUtil; - -})(); diff --git a/plugins/tiddlywiki/cecily/cecily.js b/plugins/tiddlywiki/cecily/cecily.js index 9eec05fd4d..06c1d30846 100644 --- a/plugins/tiddlywiki/cecily/cecily.js +++ b/plugins/tiddlywiki/cecily/cecily.js @@ -6,10 +6,7 @@ module-type: storyview Positions tiddlers on a 2D map \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; var CecilyStoryView = function(listWidget) { @@ -141,5 +138,3 @@ CecilyStoryView.prototype.lookupTiddlerInMap = function(title,domNode) { }; exports.cecily = CecilyStoryView; - -})(); diff --git a/plugins/tiddlywiki/classictools/modules/recipe.js b/plugins/tiddlywiki/classictools/modules/recipe.js index aa53628879..7fa918f469 100644 --- a/plugins/tiddlywiki/classictools/modules/recipe.js +++ b/plugins/tiddlywiki/classictools/modules/recipe.js @@ -8,10 +8,7 @@ Module to deserialize tiddlers from an old school TiddlyWiki recipe file. The idea is to process the recipe file recursively, loading tiddlers into the main store using synchronous file operations. The tiddlers have their titles prefixed with the associated marker in curly brackets ("{shadow}", "{tiddler}" etc). \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; exports["text/vnd.tiddlywiki2-recipe"] = function(text,fields) { @@ -80,5 +77,3 @@ exports["text/vnd.tiddlywiki2-recipe"] = function(text,fields) { }); return tiddlers; }; - -})(); diff --git a/plugins/tiddlywiki/codemirror/edit-codemirror.js b/plugins/tiddlywiki/codemirror/edit-codemirror.js index a8e79928d6..53ed6efddb 100755 --- a/plugins/tiddlywiki/codemirror/edit-codemirror.js +++ b/plugins/tiddlywiki/codemirror/edit-codemirror.js @@ -6,15 +6,10 @@ module-type: widget Edit-codemirror widget \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; var editTextWidgetFactory = require("$:/core/modules/editor/factory.js").editTextWidgetFactory, CodeMirrorEngine = require("$:/plugins/tiddlywiki/codemirror/engine.js").CodeMirrorEngine; exports["edit-codemirror"] = editTextWidgetFactory(CodeMirrorEngine,CodeMirrorEngine); - -})(); diff --git a/plugins/tiddlywiki/codemirror/engine.js b/plugins/tiddlywiki/codemirror/engine.js index d994344fc7..38064fcd6a 100755 --- a/plugins/tiddlywiki/codemirror/engine.js +++ b/plugins/tiddlywiki/codemirror/engine.js @@ -6,10 +6,7 @@ module-type: library Text editor engine based on a CodeMirror instance \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; var CODEMIRROR_OPTIONS = "$:/config/CodeMirror", @@ -316,5 +313,3 @@ CodeMirrorEngine.prototype.executeTextOperation = function(operation) { }; exports.CodeMirrorEngine = $tw.browser ? CodeMirrorEngine : require("$:/core/modules/editor/engines/simple.js").SimpleEngine; - -})(); diff --git a/plugins/tiddlywiki/confetti/confetti-manager.js b/plugins/tiddlywiki/confetti/confetti-manager.js index 0ddd6139f5..66ccb427e6 100644 --- a/plugins/tiddlywiki/confetti/confetti-manager.js +++ b/plugins/tiddlywiki/confetti/confetti-manager.js @@ -7,9 +7,6 @@ Confetti manager \*/ (function(){ - -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; var confetti = require("$:/plugins/tiddlywiki/confetti/confetti.js"); diff --git a/plugins/tiddlywiki/confetti/confetti-widget.js b/plugins/tiddlywiki/confetti/confetti-widget.js index 6c78f70666..c3bbc25e38 100644 --- a/plugins/tiddlywiki/confetti/confetti-widget.js +++ b/plugins/tiddlywiki/confetti/confetti-widget.js @@ -7,9 +7,6 @@ Confetti widget \*/ (function(){ - -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; var Widget = require("$:/core/modules/widgets/widget.js").widget; diff --git a/plugins/tiddlywiki/confetti/startup.js b/plugins/tiddlywiki/confetti/startup.js index 6634cbbcad..fafbecee72 100644 --- a/plugins/tiddlywiki/confetti/startup.js +++ b/plugins/tiddlywiki/confetti/startup.js @@ -7,9 +7,6 @@ Setup the root widget event handlers \*/ (function(){ - -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; // Export name and synchronous status diff --git a/plugins/tiddlywiki/consent-banner/raw-widget.js b/plugins/tiddlywiki/consent-banner/raw-widget.js index a38deee395..b6fd338a72 100644 --- a/plugins/tiddlywiki/consent-banner/raw-widget.js +++ b/plugins/tiddlywiki/consent-banner/raw-widget.js @@ -6,10 +6,7 @@ module-type: widget An override of the raw widget that blocks raw content until the user has consented to accept cookies \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; var Widget = require("$:/core/modules/widgets/widget.js").widget; @@ -65,5 +62,3 @@ RawWidget.prototype.refresh = function(changedTiddlers) { }; exports.raw = RawWidget; - -})(); diff --git a/plugins/tiddlywiki/consent-banner/startup.js b/plugins/tiddlywiki/consent-banner/startup.js index 861a03a918..9c2a269b3a 100644 --- a/plugins/tiddlywiki/consent-banner/startup.js +++ b/plugins/tiddlywiki/consent-banner/startup.js @@ -6,10 +6,7 @@ module-type: startup Startup initialisation \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; // Export name and synchronous status @@ -103,5 +100,3 @@ exports.startup = function() { }); } }; - -})(); diff --git a/plugins/tiddlywiki/d3/barwidget.js b/plugins/tiddlywiki/d3/barwidget.js index 08b71cff20..0603dd7b42 100644 --- a/plugins/tiddlywiki/d3/barwidget.js +++ b/plugins/tiddlywiki/d3/barwidget.js @@ -6,10 +6,7 @@ module-type: widget A widget for displaying stacked or grouped bar charts. Derived from http://bl.ocks.org/mbostock/3943967 \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; var Widget = require("$:/core/modules/widgets/widget.js").widget, @@ -200,5 +197,3 @@ BarWidget.prototype.refresh = function(changedTiddlers) { }; exports.d3bar = BarWidget; - -})(); diff --git a/plugins/tiddlywiki/d3/cloudwidget.js b/plugins/tiddlywiki/d3/cloudwidget.js index 149747d3e3..69b297d900 100644 --- a/plugins/tiddlywiki/d3/cloudwidget.js +++ b/plugins/tiddlywiki/d3/cloudwidget.js @@ -6,10 +6,7 @@ module-type: widget A widget for displaying word clouds. Derived from https://github.com/jasondavies/d3-cloud \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; var Widget = require("$:/core/modules/widgets/widget.js").widget, @@ -129,5 +126,3 @@ CloudWidget.prototype.refresh = function(changedTiddlers) { }; exports.d3cloud = CloudWidget; - -})(); diff --git a/plugins/tiddlywiki/dynannotate/modules/dynannotate.js b/plugins/tiddlywiki/dynannotate/modules/dynannotate.js index 4e4d0ef31e..5372277762 100644 --- a/plugins/tiddlywiki/dynannotate/modules/dynannotate.js +++ b/plugins/tiddlywiki/dynannotate/modules/dynannotate.js @@ -6,10 +6,7 @@ module-type: widget Dynannotate widget \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; var TextMap = require("$:/plugins/tiddlywiki/dynannotate/textmap.js").TextMap; @@ -433,5 +430,3 @@ DynannotateWidget.prototype.refresh = function(changedTiddlers) { }; exports.dynannotate = DynannotateWidget; - -})(); diff --git a/plugins/tiddlywiki/dynannotate/modules/element-spotlight.js b/plugins/tiddlywiki/dynannotate/modules/element-spotlight.js index 7b581e28d3..9a7ab71add 100644 --- a/plugins/tiddlywiki/dynannotate/modules/element-spotlight.js +++ b/plugins/tiddlywiki/dynannotate/modules/element-spotlight.js @@ -7,9 +7,6 @@ Manages the element spotlight effect \*/ (function(){ - -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; function ElementSpotlight() { diff --git a/plugins/tiddlywiki/dynannotate/modules/legacy-selection-tracker.js b/plugins/tiddlywiki/dynannotate/modules/legacy-selection-tracker.js index f282601f8b..43fbe5148b 100644 --- a/plugins/tiddlywiki/dynannotate/modules/legacy-selection-tracker.js +++ b/plugins/tiddlywiki/dynannotate/modules/legacy-selection-tracker.js @@ -6,10 +6,7 @@ module-type: library Legacy version of the dyannotate background daemon to track the selection \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; var TextMap = require("$:/plugins/tiddlywiki/dynannotate/textmap.js").TextMap; @@ -100,5 +97,3 @@ LegacySelectionTracker.prototype.findSelectionContainer = function findSelection }; exports.LegacySelectionTracker = LegacySelectionTracker; - -})(); diff --git a/plugins/tiddlywiki/dynannotate/modules/selection-tracker.js b/plugins/tiddlywiki/dynannotate/modules/selection-tracker.js index 6b74d0c4ba..2ae328e5b3 100644 --- a/plugins/tiddlywiki/dynannotate/modules/selection-tracker.js +++ b/plugins/tiddlywiki/dynannotate/modules/selection-tracker.js @@ -6,10 +6,7 @@ module-type: library Background daemon to track the selection \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; function SelectionTracker(wiki,options) { @@ -167,5 +164,3 @@ SelectionTracker.prototype.performSelectionActions = function(chunks,variables,a }; exports.SelectionTracker = SelectionTracker; - -})(); diff --git a/plugins/tiddlywiki/dynannotate/modules/startup.js b/plugins/tiddlywiki/dynannotate/modules/startup.js index 4324c58937..cdcbd4bfb4 100644 --- a/plugins/tiddlywiki/dynannotate/modules/startup.js +++ b/plugins/tiddlywiki/dynannotate/modules/startup.js @@ -10,8 +10,6 @@ Startup the dyannotate background daemon to track the selection \*/ (function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; // Export name and synchronous status @@ -60,4 +58,3 @@ exports.startup = function() { }; })(); - \ No newline at end of file diff --git a/plugins/tiddlywiki/dynannotate/modules/textmap.js b/plugins/tiddlywiki/dynannotate/modules/textmap.js index 934ceb0ffc..5e523a2cc2 100644 --- a/plugins/tiddlywiki/dynannotate/modules/textmap.js +++ b/plugins/tiddlywiki/dynannotate/modules/textmap.js @@ -6,10 +6,7 @@ module-type: library Structure for modelling mapping between a string and its representation in the DOM \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; var PREFIX_SUFFIX_LENGTH = 50; @@ -178,5 +175,3 @@ exports.TextMap.prototype.extractContext = function(startContainer,startOffset,t suffix: this.string.slice(startPos + text.length, Math.min(startPos + text.length + PREFIX_SUFFIX_LENGTH, this.string.length)) }; }; - -})(); diff --git a/plugins/tiddlywiki/dynaview/dynaview.js b/plugins/tiddlywiki/dynaview/dynaview.js index 271a419859..2f8af31f53 100644 --- a/plugins/tiddlywiki/dynaview/dynaview.js +++ b/plugins/tiddlywiki/dynaview/dynaview.js @@ -6,10 +6,7 @@ module-type: startup Zoom everything \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; // Export name and synchronous status @@ -263,5 +260,3 @@ function saveViewportDimensions() { } } } - -})(); diff --git a/plugins/tiddlywiki/evernote/modules/enex-deserializer.js b/plugins/tiddlywiki/evernote/modules/enex-deserializer.js index 0e195b5ead..e3535c74d6 100644 --- a/plugins/tiddlywiki/evernote/modules/enex-deserializer.js +++ b/plugins/tiddlywiki/evernote/modules/enex-deserializer.js @@ -8,10 +8,7 @@ ENEX file deserializer For details see: https://blog.evernote.com/tech/2013/08/08/evernote-export-format-enex/ \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; // DOMParser = require("$:/plugins/tiddlywiki/xmldom/dom-parser").DOMParser; @@ -136,4 +133,18 @@ function fixAttachmentReference(contentNode, md5Hash, mimeType, name) { } -})(); +function fixAttachmentReference(contentNode, md5Hash, mimeType, name) { + if(!contentNode) return; + var mediaNode = contentNode.querySelector('en-media[hash="' + md5Hash + '"]'); + if(!name) { + throw new Error("name is empty for resource hash" + md5Hash); + } + if(!mediaNode) return; + if(mimeType.indexOf("image/") === 0) { + // find en-media node, replace with image syntax + mediaNode.parentNode.replaceChild($tw.utils.domMaker("p", {text: "[img["+ name + "]]"}), mediaNode); + } else { + // For other than image attachments, we make a link to the tiddler + mediaNode.parentNode.replaceChild($tw.utils.domMaker("p", {text: "[["+ name + "]]"}), mediaNode); + } +} diff --git a/plugins/tiddlywiki/external-attachments/startup.js b/plugins/tiddlywiki/external-attachments/startup.js index 9478c6e2ac..898c92e960 100644 --- a/plugins/tiddlywiki/external-attachments/startup.js +++ b/plugins/tiddlywiki/external-attachments/startup.js @@ -6,10 +6,7 @@ module-type: startup Startup initialisation \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; var ENABLE_EXTERNAL_ATTACHMENTS_TITLE = "$:/config/ExternalAttachments/Enable", @@ -123,6 +120,3 @@ function test_makePathRelative() { test("\\\\SHARE\\Users\\me\\something\\file.png","/SHARE/Users/me/somethingelse/index.html","../something/file.png",{isWindows: true}); test("\\\\SHARE\\Users\\me\\something\\file.png","/C:/Users/me/something/index.html","/SHARE/Users/me/something/file.png",{isWindows: true}); } - - -})(); diff --git a/plugins/tiddlywiki/filesystem/filesystemadaptor.js b/plugins/tiddlywiki/filesystem/filesystemadaptor.js index 451928101e..b5cc8fa619 100644 --- a/plugins/tiddlywiki/filesystem/filesystemadaptor.js +++ b/plugins/tiddlywiki/filesystem/filesystemadaptor.js @@ -6,10 +6,7 @@ module-type: syncadaptor A sync adaptor module for synchronising with the local filesystem via node.js APIs \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; // Get a reference to the file system @@ -167,5 +164,3 @@ FileSystemAdaptor.prototype.removeTiddlerFileInfo = function(title) { if(fs) { exports.adaptorClass = FileSystemAdaptor; } - -})(); diff --git a/plugins/tiddlywiki/freelinks/plain-text.js b/plugins/tiddlywiki/freelinks/plain-text.js index 2e7e0d7079..93572c3d45 100644 --- a/plugins/tiddlywiki/freelinks/plain-text.js +++ b/plugins/tiddlywiki/freelinks/plain-text.js @@ -6,10 +6,7 @@ module-type: widget A copy of the core text widget under a different name \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; var Widget = require("$:/core/modules/widgets/widget.js").widget; @@ -58,5 +55,3 @@ PlainTextNodeWidget.prototype.refresh = function(changedTiddlers) { }; exports["plain-text"] = PlainTextNodeWidget; - -})(); diff --git a/plugins/tiddlywiki/freelinks/text.js b/plugins/tiddlywiki/freelinks/text.js index 2b3370ebd8..658a3ca96c 100755 --- a/plugins/tiddlywiki/freelinks/text.js +++ b/plugins/tiddlywiki/freelinks/text.js @@ -6,10 +6,7 @@ module-type: widget An override of the core text widget that automatically linkifies the text \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; var TITLE_TARGET_FILTER = "$:/config/Freelinks/TargetFilter"; @@ -164,5 +161,3 @@ TextNodeWidget.prototype.refresh = function(changedTiddlers) { }; exports.text = TextNodeWidget; - -})(); diff --git a/plugins/tiddlywiki/geospatial/geotools.js b/plugins/tiddlywiki/geospatial/geotools.js index 38df56a524..9d3c534f69 100644 --- a/plugins/tiddlywiki/geospatial/geotools.js +++ b/plugins/tiddlywiki/geospatial/geotools.js @@ -6,10 +6,7 @@ module-type: library Geospatial utilities \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; var turf = require("$:/plugins/tiddlywiki/geospatial/turf.js"); @@ -37,5 +34,3 @@ exports.parsePoint = function(str) { // Return the string now we know it is a valid GeoJSON Point return json; } - -})(); diff --git a/plugins/tiddlywiki/geospatial/operators/helper.js b/plugins/tiddlywiki/geospatial/operators/helper.js index 164b1dc86b..e083f44712 100644 --- a/plugins/tiddlywiki/geospatial/operators/helper.js +++ b/plugins/tiddlywiki/geospatial/operators/helper.js @@ -6,10 +6,7 @@ module-type: filteroperator Filter operators for geospatial helpers \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; var turf = require("$:/plugins/tiddlywiki/geospatial/turf.js"); @@ -20,5 +17,3 @@ exports.geopoint = function(source,operator,options) { alt = $tw.utils.parseNumber(operator.operands[2] || "0"); return [JSON.stringify(turf.point([long,lat,alt]))]; }; - -})(); diff --git a/plugins/tiddlywiki/geospatial/operators/lookup.js b/plugins/tiddlywiki/geospatial/operators/lookup.js index 59ca131e78..da152c15bc 100644 --- a/plugins/tiddlywiki/geospatial/operators/lookup.js +++ b/plugins/tiddlywiki/geospatial/operators/lookup.js @@ -6,10 +6,6 @@ module-type: filteroperator Filter operators for geospatial lookup \*/ -(function(){ - -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; var turf = require("$:/plugins/tiddlywiki/geospatial/turf.js"), @@ -41,5 +37,3 @@ function getPolygonsContainingPoint(featureCollection,point) { }); return properties; } - -})(); diff --git a/plugins/tiddlywiki/geospatial/operators/measurement.js b/plugins/tiddlywiki/geospatial/operators/measurement.js index 51c46b6543..6b88bb3c43 100644 --- a/plugins/tiddlywiki/geospatial/operators/measurement.js +++ b/plugins/tiddlywiki/geospatial/operators/measurement.js @@ -6,10 +6,7 @@ module-type: filteroperator Filter operators for geospatial measurement \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; var turf = require("$:/plugins/tiddlywiki/geospatial/turf.js"), @@ -50,5 +47,3 @@ exports.geonearestpoint = function(source,operator,options) { return []; } }; - -})(); diff --git a/plugins/tiddlywiki/geospatial/operators/olc.js b/plugins/tiddlywiki/geospatial/operators/olc.js index ee8c34fa5e..c0c3dbfefa 100644 --- a/plugins/tiddlywiki/geospatial/operators/olc.js +++ b/plugins/tiddlywiki/geospatial/operators/olc.js @@ -6,10 +6,7 @@ module-type: filteroperator Filter operators for open location code conversions \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; var openlocationcode = require("$:/plugins/tiddlywiki/geospatial/openlocationcode.js"), @@ -51,5 +48,3 @@ exports["olc-encode"] = function(source,operator,options) { } return [olc]; }; - -})(); diff --git a/plugins/tiddlywiki/geospatial/operators/transformation.js b/plugins/tiddlywiki/geospatial/operators/transformation.js index 2947780c50..3538be3ee4 100644 --- a/plugins/tiddlywiki/geospatial/operators/transformation.js +++ b/plugins/tiddlywiki/geospatial/operators/transformation.js @@ -6,10 +6,7 @@ module-type: filteroperator Filter operators for geospatial transformation \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; var turf = require("$:/plugins/tiddlywiki/geospatial/turf.js"), @@ -83,6 +80,3 @@ function geojsonOp(geojsonObjects, op) { }); return turf.featureCollection(resultFeatures); } - - -})(); diff --git a/plugins/tiddlywiki/geospatial/startup.js b/plugins/tiddlywiki/geospatial/startup.js index 1b76e9949e..43ee207dd4 100644 --- a/plugins/tiddlywiki/geospatial/startup.js +++ b/plugins/tiddlywiki/geospatial/startup.js @@ -6,10 +6,7 @@ module-type: startup Geospatial initialisation \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; // Export name and synchronous status @@ -74,5 +71,3 @@ exports.startup = function() { } }); }; - -})(); diff --git a/plugins/tiddlywiki/geospatial/widgets/geobaselayer.js b/plugins/tiddlywiki/geospatial/widgets/geobaselayer.js index 09920219b8..7979642676 100644 --- a/plugins/tiddlywiki/geospatial/widgets/geobaselayer.js +++ b/plugins/tiddlywiki/geospatial/widgets/geobaselayer.js @@ -6,12 +6,7 @@ module-type: widget geobaselayer widget to represent a base layer for a geomap widget. Clone of the data widget \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; exports.geobaselayer = require("$:/core/modules/widgets/data.js").data; - -})(); diff --git a/plugins/tiddlywiki/geospatial/widgets/geolayer.js b/plugins/tiddlywiki/geospatial/widgets/geolayer.js index b39cd402ef..301c9630cf 100644 --- a/plugins/tiddlywiki/geospatial/widgets/geolayer.js +++ b/plugins/tiddlywiki/geospatial/widgets/geolayer.js @@ -6,12 +6,7 @@ module-type: widget geolayer widget to represent a layer for a geomap widget. Clone of the data widget \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; exports.geolayer = require("$:/core/modules/widgets/data.js").data; - -})(); diff --git a/plugins/tiddlywiki/geospatial/widgets/geomap.js b/plugins/tiddlywiki/geospatial/widgets/geomap.js index f3cad03775..a5e24d80db 100644 --- a/plugins/tiddlywiki/geospatial/widgets/geomap.js +++ b/plugins/tiddlywiki/geospatial/widgets/geomap.js @@ -6,10 +6,7 @@ module-type: widget Leaflet map widget \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; var Widget = require("$:/core/modules/widgets/widget.js").widget; @@ -351,6 +348,3 @@ GeomapWidget.prototype.refresh = function(changedTiddlers) { }; exports.geomap = GeomapWidget; - -})(); - diff --git a/plugins/tiddlywiki/googleanalytics/googleanalytics.js b/plugins/tiddlywiki/googleanalytics/googleanalytics.js index ef333ffb9f..4dfbb1ef54 100644 --- a/plugins/tiddlywiki/googleanalytics/googleanalytics.js +++ b/plugins/tiddlywiki/googleanalytics/googleanalytics.js @@ -6,10 +6,7 @@ module-type: startup Runs Google Analytics with the measurement ID in the tiddler `$:/GoogleAnalyticsMeasurementID` \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; // Export name and synchronous status @@ -55,7 +52,3 @@ exports.startup = function() { } } }; - - - -})(); diff --git a/plugins/tiddlywiki/highlight-legacy/highlightblock.js b/plugins/tiddlywiki/highlight-legacy/highlightblock.js index 9c1187a914..9e295d013d 100644 --- a/plugins/tiddlywiki/highlight-legacy/highlightblock.js +++ b/plugins/tiddlywiki/highlight-legacy/highlightblock.js @@ -6,10 +6,6 @@ module-type: widget Wraps up the fenced code blocks parser for highlight and use in TiddlyWiki5 \*/ -(function() { - -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; var TYPE_MAPPINGS_BASE = "$:/config/HighlightPlugin/TypeMappings/"; @@ -40,5 +36,3 @@ CodeBlockWidget.prototype.postRender = function() { } } }; - -})(); diff --git a/plugins/tiddlywiki/highlight/highlightblock.js b/plugins/tiddlywiki/highlight/highlightblock.js index 1d80346318..3bc515fd63 100644 --- a/plugins/tiddlywiki/highlight/highlightblock.js +++ b/plugins/tiddlywiki/highlight/highlightblock.js @@ -6,10 +6,6 @@ module-type: widget Wraps up the fenced code blocks parser for highlight and use in TiddlyWiki5 \*/ -(function() { - -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; var TYPE_MAPPINGS_BASE = "$:/config/HighlightPlugin/TypeMappings/"; @@ -46,6 +42,4 @@ if(hljs.getLanguage !== undefined) { } } }; -} - -})(); +} diff --git a/plugins/tiddlywiki/innerwiki/anchor.js b/plugins/tiddlywiki/innerwiki/anchor.js index b18be7e7cc..5843702560 100644 --- a/plugins/tiddlywiki/innerwiki/anchor.js +++ b/plugins/tiddlywiki/innerwiki/anchor.js @@ -7,9 +7,6 @@ Anchor widget to represent an innerwiki graphical anchor. Clone of the data widg \*/ (function(){ - -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; exports.anchor = require("$:/core/modules/widgets/data.js").data; diff --git a/plugins/tiddlywiki/innerwiki/innerwiki.js b/plugins/tiddlywiki/innerwiki/innerwiki.js index 9bd58eba8f..2142a03166 100644 --- a/plugins/tiddlywiki/innerwiki/innerwiki.js +++ b/plugins/tiddlywiki/innerwiki/innerwiki.js @@ -6,10 +6,7 @@ module-type: widget Widget to display an innerwiki in an iframe \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; var DEFAULT_INNERWIKI_TEMPLATE = "$:/plugins/tiddlywiki/innerwiki/template"; @@ -347,5 +344,3 @@ InnerWikiWidget.prototype.saveScreenshot = function(options,callback) { }; exports.innerwiki = InnerWikiWidget; - -})(); diff --git a/plugins/tiddlywiki/innerwiki/screenshot.js b/plugins/tiddlywiki/innerwiki/screenshot.js index 428dfb59e4..954c8ead49 100644 --- a/plugins/tiddlywiki/innerwiki/screenshot.js +++ b/plugins/tiddlywiki/innerwiki/screenshot.js @@ -6,10 +6,7 @@ module-type: command Commands to render tiddlers identified by a filter and save any screenshots identified by <$innerwiki> widgets \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; var InnerWikiWidget = require("$:/plugins/tiddlywiki/innerwiki/innerwiki.js").innerwiki; @@ -79,5 +76,3 @@ Command.prototype.findInnerWikiWidgets = function(widgetNode) { }; exports.Command = Command; - -})(); diff --git a/plugins/tiddlywiki/jasmine/command.js b/plugins/tiddlywiki/jasmine/command.js index fe7e623345..155b9bbeb6 100644 --- a/plugins/tiddlywiki/jasmine/command.js +++ b/plugins/tiddlywiki/jasmine/command.js @@ -6,9 +6,6 @@ module-type: command The command which executes jasmine on the command line for TiddlyWiki5 \*/ - -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; var jasmine = require("./jasmine-plugin.js"); diff --git a/plugins/tiddlywiki/jasmine/jasmine-plugin.js b/plugins/tiddlywiki/jasmine/jasmine-plugin.js index 8dbf6568e9..a6b0be7537 100644 --- a/plugins/tiddlywiki/jasmine/jasmine-plugin.js +++ b/plugins/tiddlywiki/jasmine/jasmine-plugin.js @@ -6,10 +6,8 @@ module-type: library The main module of the Jasmine test plugin for TiddlyWiki5 \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: true */ + "use strict"; var TEST_TIDDLER_FILTER = "[all[tiddlers+shadows]type[application/javascript]tag[$:/tags/test-spec]]"; @@ -157,5 +155,3 @@ exports.runTests = function(callback,specFilter) { nodeJasmineWrapper.execute(null,specFilter); } }; - -})(); diff --git a/plugins/tiddlywiki/jasmine/run-wiki-based-tests.js b/plugins/tiddlywiki/jasmine/run-wiki-based-tests.js index 2e854cf463..52d86de77e 100644 --- a/plugins/tiddlywiki/jasmine/run-wiki-based-tests.js +++ b/plugins/tiddlywiki/jasmine/run-wiki-based-tests.js @@ -6,10 +6,7 @@ tags: [[$:/tags/test-spec]] Tests the wiki based tests \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; var TEST_WIKI_TIDDLER_FILTER = "[all[tiddlers+shadows]type[text/vnd.tiddlywiki-multiple]tag[$:/tags/wiki-test-spec]]"; @@ -99,5 +96,3 @@ describe("Wiki-based tests", function() { } }); - -})(); diff --git a/plugins/tiddlywiki/jasmine/startup.js b/plugins/tiddlywiki/jasmine/startup.js index 47aec342da..276381cffb 100644 --- a/plugins/tiddlywiki/jasmine/startup.js +++ b/plugins/tiddlywiki/jasmine/startup.js @@ -6,10 +6,8 @@ module-type: startup The main module of the Jasmine test plugin for TiddlyWiki5 \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: true */ + "use strict"; var jasmine = require("./jasmine-plugin.js"); @@ -34,5 +32,3 @@ if($tw.browser) { // We make this check after the commands are run. exports.after = ["commands"]; } - -})(); diff --git a/plugins/tiddlywiki/jszip/startup.js b/plugins/tiddlywiki/jszip/startup.js index 26466d74e1..812d90bc72 100644 --- a/plugins/tiddlywiki/jszip/startup.js +++ b/plugins/tiddlywiki/jszip/startup.js @@ -6,10 +6,7 @@ module-type: startup Setup the root widget event handlers \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; var JSZip = require("$:/plugins/tiddlywiki/jszip/jszip.js"); @@ -100,5 +97,3 @@ function downloadZipFile(title,filename) { document.body.removeChild(link); } } - -})(); diff --git a/plugins/tiddlywiki/katex/latex-parser.js b/plugins/tiddlywiki/katex/latex-parser.js index 6b72c7f515..78b6eee2e0 100644 --- a/plugins/tiddlywiki/katex/latex-parser.js +++ b/plugins/tiddlywiki/katex/latex-parser.js @@ -17,10 +17,7 @@ This wikiparser can be modified using the rules eg: ``` \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; exports.name = "latex-parser"; @@ -65,5 +62,3 @@ exports.parse = function() { } }]; }; - -})(); diff --git a/plugins/tiddlywiki/katex/wrapper.js b/plugins/tiddlywiki/katex/wrapper.js index 1b41655cab..05b820749b 100644 --- a/plugins/tiddlywiki/katex/wrapper.js +++ b/plugins/tiddlywiki/katex/wrapper.js @@ -6,10 +6,7 @@ module-type: widget Wrapper for `katex.min.js` that provides a `<$latex>` widget. It is also available under the alias `<$katex>` \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; var katex = require("$:/plugins/tiddlywiki/katex/katex.min.js"), @@ -94,6 +91,3 @@ KaTeXWidget.prototype.refresh = function(changedTiddlers) { exports.latex = KaTeXWidget; exports.katex = KaTeXWidget; - -})(); - diff --git a/plugins/tiddlywiki/markdown-legacy/editor-operations/make-markdown-link.js b/plugins/tiddlywiki/markdown-legacy/editor-operations/make-markdown-link.js index 13f5026a7e..75f3cc5745 100644 --- a/plugins/tiddlywiki/markdown-legacy/editor-operations/make-markdown-link.js +++ b/plugins/tiddlywiki/markdown-legacy/editor-operations/make-markdown-link.js @@ -6,10 +6,7 @@ module-type: texteditoroperation Text editor operation to make a markdown link \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; exports["make-markdown-link"] = function(event,operation) { @@ -33,5 +30,3 @@ exports["make-markdown-link"] = function(event,operation) { operation.newSelStart = operation.selStart + operation.replacement.length; operation.newSelEnd = operation.newSelStart; }; - -})(); diff --git a/plugins/tiddlywiki/markdown-legacy/wrapper.js b/plugins/tiddlywiki/markdown-legacy/wrapper.js index 6fa56232a9..c1da539cc3 100755 --- a/plugins/tiddlywiki/markdown-legacy/wrapper.js +++ b/plugins/tiddlywiki/markdown-legacy/wrapper.js @@ -6,10 +6,7 @@ module-type: parser Wraps up the remarkable parser for use as a Parser in TiddlyWiki \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; var r = require("$:/plugins/tiddlywiki/markdown-legacy/remarkable.js"); @@ -337,5 +334,3 @@ var MarkdownParser = function(type, text, options) { exports["text/x-markdown"] = MarkdownParser; exports["text/markdown"] = MarkdownParser; - -})(); diff --git a/plugins/tiddlywiki/markdown/editor-operations/make-markdown-link.js b/plugins/tiddlywiki/markdown/editor-operations/make-markdown-link.js index 76f62f5a57..5a3502695d 100644 --- a/plugins/tiddlywiki/markdown/editor-operations/make-markdown-link.js +++ b/plugins/tiddlywiki/markdown/editor-operations/make-markdown-link.js @@ -6,10 +6,7 @@ module-type: texteditoroperation Text editor operation to make a markdown link \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; exports["make-markdown-link"] = function(event,operation) { @@ -39,5 +36,3 @@ exports["make-markdown-link"] = function(event,operation) { operation.newSelStart = operation.selStart + operation.replacement.length; operation.newSelEnd = operation.newSelStart; }; - -})(); diff --git a/plugins/tiddlywiki/markdown/markdown-it-katex.js b/plugins/tiddlywiki/markdown/markdown-it-katex.js index dc70f829af..ac8b6d2ab4 100644 --- a/plugins/tiddlywiki/markdown/markdown-it-katex.js +++ b/plugins/tiddlywiki/markdown/markdown-it-katex.js @@ -5,7 +5,7 @@ module-type: library Based on markdown-it-katex v2.0.0 by @waylonflinn https://github.com/waylonflinn/markdown-it-katex | MIT License \*/ -(function(){ + /* Process inline math */ /* Like markdown-it-simplemath, this is a stripped down, simplified version of: @@ -166,5 +166,4 @@ function math_inline_block(state, silent) { module.exports = function math_plugin(md, options) { md.inline.ruler.after('escape', 'math_inline', math_inline); md.inline.ruler.after('escape', 'math_inline_block', math_inline_block); -}; -})(); \ No newline at end of file +}; \ No newline at end of file diff --git a/plugins/tiddlywiki/markdown/markdown-it-tiddlywiki.js b/plugins/tiddlywiki/markdown/markdown-it-tiddlywiki.js index 64189ba8bf..ad55daa75d 100644 --- a/plugins/tiddlywiki/markdown/markdown-it-tiddlywiki.js +++ b/plugins/tiddlywiki/markdown/markdown-it-tiddlywiki.js @@ -6,10 +6,7 @@ module-type: library Wraps up the markdown-it parser for use as a Parser in TiddlyWiki \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; var md; @@ -535,5 +532,3 @@ module.exports = function tiddlyWikiPlugin(markdown,options) { md.core.ruler.disable('text_join'); md.core.ruler.push('wikify',wikify); }; - -})(); diff --git a/plugins/tiddlywiki/markdown/wrapper.js b/plugins/tiddlywiki/markdown/wrapper.js index 708b932e39..83da544b95 100755 --- a/plugins/tiddlywiki/markdown/wrapper.js +++ b/plugins/tiddlywiki/markdown/wrapper.js @@ -6,10 +6,7 @@ module-type: parser Wraps up the markdown-it parser for use as a Parser in TiddlyWiki \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; var MarkdownIt = require("./markdown-it"); @@ -261,4 +258,3 @@ function MarkdownParser(type,text,options) { exports["text/markdown"] = MarkdownParser; exports["text/x-markdown"] = MarkdownParser; -})(); diff --git a/plugins/tiddlywiki/mobiledragdrop/startup.js b/plugins/tiddlywiki/mobiledragdrop/startup.js index 6abbbd16de..311bacc547 100644 --- a/plugins/tiddlywiki/mobiledragdrop/startup.js +++ b/plugins/tiddlywiki/mobiledragdrop/startup.js @@ -6,10 +6,7 @@ module-type: startup Startup initialisation \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; // Export name and synchronous status @@ -21,5 +18,3 @@ exports.synchronous = true; exports.startup = function() { window.addEventListener("touchmove", function() {}); }; - -})(); diff --git a/plugins/tiddlywiki/nodewebkitsaver/nodewebkit.js b/plugins/tiddlywiki/nodewebkitsaver/nodewebkit.js index 73cbd2f100..85fe21ef5f 100644 --- a/plugins/tiddlywiki/nodewebkitsaver/nodewebkit.js +++ b/plugins/tiddlywiki/nodewebkitsaver/nodewebkit.js @@ -6,7 +6,7 @@ module-type: saver Handles saving changes in the NW.js environment. Not required by TiddlyDesktop, which re-uses the TiddlyFox saver, but useful if you're embedding a single TiddlyWiki document into a NW.js app. \*/ -(function(){ + /*jslint node: true, browser: true */ /*global $tw: false, netscape: false, Components: false */ @@ -57,5 +57,3 @@ Create an instance of this saver exports.create = function(wiki) { return new NodeWebKitSaver(wiki); }; - -})(); diff --git a/plugins/tiddlywiki/pluginlibrary/libraryserver.js b/plugins/tiddlywiki/pluginlibrary/libraryserver.js index 4f5f3e2eca..01814d7912 100644 --- a/plugins/tiddlywiki/pluginlibrary/libraryserver.js +++ b/plugins/tiddlywiki/pluginlibrary/libraryserver.js @@ -6,10 +6,7 @@ module-type: library A simple HTTP-over-window.postMessage implementation of a standard TiddlyWeb-compatible server. It uses real HTTP to load the individual tiddler JSON files. \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; // Listen for window messages @@ -86,5 +83,3 @@ function httpGet(url,callback) { }; http.send(); } - -})(); diff --git a/plugins/tiddlywiki/qrcode/barcodereader.js b/plugins/tiddlywiki/qrcode/barcodereader.js index 79d2592546..f44ec4c0e2 100644 --- a/plugins/tiddlywiki/qrcode/barcodereader.js +++ b/plugins/tiddlywiki/qrcode/barcodereader.js @@ -7,9 +7,6 @@ barcodereader widget for reading barcodes \*/ (function(){ - -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; var Widget = require("$:/core/modules/widgets/widget.js").widget; diff --git a/plugins/tiddlywiki/qrcode/makeqr.js b/plugins/tiddlywiki/qrcode/makeqr.js index 0328a84681..409af17c31 100644 --- a/plugins/tiddlywiki/qrcode/makeqr.js +++ b/plugins/tiddlywiki/qrcode/makeqr.js @@ -6,10 +6,7 @@ module-type: macro Macro to convert a string into a QR Code \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; /* @@ -69,6 +66,3 @@ function generateQrCode(text,options) { margin = parseInt((size - qr.getModuleCount() * cellsize) / 2); return qr.createImgTag(cellsize, margin, size); } - - -})(); diff --git a/plugins/tiddlywiki/railroad/components.js b/plugins/tiddlywiki/railroad/components.js index 85d0d16e23..669e42333c 100644 --- a/plugins/tiddlywiki/railroad/components.js +++ b/plugins/tiddlywiki/railroad/components.js @@ -6,10 +6,7 @@ module-type: library Components of a railroad diagram. \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; var railroad = require("$:/plugins/tiddlywiki/railroad/railroad-diagrams.js"); @@ -287,5 +284,3 @@ exports.components = { Terminal: Terminal, Transclusion: Transclusion }; - -})(); \ No newline at end of file diff --git a/plugins/tiddlywiki/railroad/parser.js b/plugins/tiddlywiki/railroad/parser.js index 02256524dd..38e9ee32f0 100644 --- a/plugins/tiddlywiki/railroad/parser.js +++ b/plugins/tiddlywiki/railroad/parser.js @@ -33,10 +33,7 @@ pragmas: \end single|double|none \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; var components = require("$:/plugins/tiddlywiki/railroad/components.js").components; @@ -448,5 +445,3 @@ Parser.prototype.readPragma = function(source,pos) { /////////////////////////// Exports exports.parser = Parser; - -})(); \ No newline at end of file diff --git a/plugins/tiddlywiki/railroad/typed-parser.js b/plugins/tiddlywiki/railroad/typed-parser.js index c956ff09ba..ac93bf8e1c 100644 --- a/plugins/tiddlywiki/railroad/typed-parser.js +++ b/plugins/tiddlywiki/railroad/typed-parser.js @@ -6,10 +6,7 @@ module-type: parser This parser wraps unadorned railroad syntax into a railroad widget \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; var RailroadParser = function(type,text,options) { @@ -23,6 +20,3 @@ console.log(text); }; exports["text/vnd.tiddlywiki.railroad"] = RailroadParser; - -})(); - diff --git a/plugins/tiddlywiki/railroad/wrapper.js b/plugins/tiddlywiki/railroad/wrapper.js index 311d2f4208..0e2a90059a 100644 --- a/plugins/tiddlywiki/railroad/wrapper.js +++ b/plugins/tiddlywiki/railroad/wrapper.js @@ -6,10 +6,7 @@ module-type: widget Wrapper for `railroad-diagrams.js` that provides a `<$railroad>` widget. \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; var Parser = require("$:/plugins/tiddlywiki/railroad/parser.js").parser, @@ -143,5 +140,3 @@ RailroadWidget.prototype.dispatchLink = function(to,event) { }; exports.railroad = RailroadWidget; - -})(); \ No newline at end of file diff --git a/plugins/tiddlywiki/savetrail/savetrail.js b/plugins/tiddlywiki/savetrail/savetrail.js index ec6fe7c01b..a1f253ba38 100644 --- a/plugins/tiddlywiki/savetrail/savetrail.js +++ b/plugins/tiddlywiki/savetrail/savetrail.js @@ -6,10 +6,7 @@ module-type: startup A startup module to download every changed tiddler as a JSON file \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; // Export name and synchronous status @@ -149,5 +146,3 @@ function saveTiddlerFile(tiddler,options) { link.click(); document.body.removeChild(link); } - -})(); diff --git a/plugins/tiddlywiki/share/rawmarkup.js b/plugins/tiddlywiki/share/rawmarkup.js index 264f7fc736..0c4c58b92e 100644 --- a/plugins/tiddlywiki/share/rawmarkup.js +++ b/plugins/tiddlywiki/share/rawmarkup.js @@ -6,10 +6,7 @@ module-type: library Read tiddlers from the browser location hash \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; // Get the hash @@ -108,5 +105,3 @@ function removeWarningBanner() { warningWrapper.parentNode.removeChild(warningWrapper); stylesWrapper.parentNode.removeChild(stylesWrapper); } - -})(); diff --git a/plugins/tiddlywiki/stacked-view/stacked.js b/plugins/tiddlywiki/stacked-view/stacked.js index 32d30d6d5d..9ef5d5bffe 100644 --- a/plugins/tiddlywiki/stacked-view/stacked.js +++ b/plugins/tiddlywiki/stacked-view/stacked.js @@ -6,10 +6,7 @@ module-type: storyview Keeps tiddlers in a stack \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; var easing = "cubic-bezier(0.645, 0.045, 0.355, 1)"; // From http://easings.net/#easeInOutCubic @@ -84,5 +81,3 @@ StackedListView.prototype.remove = function(widget) { }; exports.stacked = StackedListView; - -})(); \ No newline at end of file diff --git a/plugins/tiddlywiki/tahoelafs/saver.js b/plugins/tiddlywiki/tahoelafs/saver.js index 2e508352e7..bfbe7f3222 100644 --- a/plugins/tiddlywiki/tahoelafs/saver.js +++ b/plugins/tiddlywiki/tahoelafs/saver.js @@ -6,10 +6,7 @@ module-type: saver A bare bones saver for Tahoe-LAFS. It just PUTs the new HTML file back to the server at the same URL. \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; /* @@ -53,5 +50,3 @@ Create an instance of this saver exports.create = function(wiki) { return new TahoeSaver(wiki); }; - -})(); diff --git a/plugins/tiddlywiki/text-slicer/modules/commands/slice.js b/plugins/tiddlywiki/text-slicer/modules/commands/slice.js index 67f2b02f12..2debe95a8c 100644 --- a/plugins/tiddlywiki/text-slicer/modules/commands/slice.js +++ b/plugins/tiddlywiki/text-slicer/modules/commands/slice.js @@ -6,10 +6,7 @@ module-type: command Command to slice a specified tiddler \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; var widget = require("$:/core/modules/widgets/widget.js"), @@ -54,5 +51,3 @@ Command.prototype.execute = function() { }; exports.Command = Command; - -})(); diff --git a/plugins/tiddlywiki/text-slicer/modules/filters/list-children.js b/plugins/tiddlywiki/text-slicer/modules/filters/list-children.js index 443f80a0bb..828a0599cb 100644 --- a/plugins/tiddlywiki/text-slicer/modules/filters/list-children.js +++ b/plugins/tiddlywiki/text-slicer/modules/filters/list-children.js @@ -6,10 +6,7 @@ module-type: filteroperator Filter operator returning all the descendents of a tiddler listed in the "list" field \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; /* @@ -34,5 +31,3 @@ exports["list-children"] = function(source,operator,options) { }); return Object.keys(children); }; - -})(); diff --git a/plugins/tiddlywiki/text-slicer/modules/slicer.js b/plugins/tiddlywiki/text-slicer/modules/slicer.js index 2fc2238bb7..ad18b45fa6 100644 --- a/plugins/tiddlywiki/text-slicer/modules/slicer.js +++ b/plugins/tiddlywiki/text-slicer/modules/slicer.js @@ -16,10 +16,7 @@ var slicer = new textSlicer.Slicer(doc,{ }); \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; function Slicer(options) { @@ -474,5 +471,3 @@ Slicer.prototype.makeTitle = function(prefix) { }; exports.Slicer = Slicer; - -})(); diff --git a/plugins/tiddlywiki/text-slicer/modules/startup/slicer-startup.js b/plugins/tiddlywiki/text-slicer/modules/startup/slicer-startup.js index 19eeac5bef..0fee863637 100644 --- a/plugins/tiddlywiki/text-slicer/modules/startup/slicer-startup.js +++ b/plugins/tiddlywiki/text-slicer/modules/startup/slicer-startup.js @@ -6,10 +6,7 @@ module-type: startup Setup the root widget event handlers \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; var textSlicer = require("$:/plugins/tiddlywiki/text-slicer/modules/slicer.js"); @@ -47,5 +44,3 @@ exports.startup = function() { }); }); }; - -})(); diff --git a/plugins/tiddlywiki/tiddlyweb/tiddlywebadaptor.js b/plugins/tiddlywiki/tiddlyweb/tiddlywebadaptor.js index b91ea35607..b33d3b5e6c 100644 --- a/plugins/tiddlywiki/tiddlyweb/tiddlywebadaptor.js +++ b/plugins/tiddlywiki/tiddlyweb/tiddlywebadaptor.js @@ -6,10 +6,7 @@ module-type: syncadaptor A sync adaptor module for synchronising with TiddlyWeb compatible servers \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; var CONFIG_HOST_TIDDLER = "$:/config/tiddlyweb/host", @@ -375,5 +372,3 @@ TiddlyWebAdaptor.prototype.parseEtag = function(etag) { if($tw.browser && document.location.protocol.substr(0,4) === "http" ) { exports.adaptorClass = TiddlyWebAdaptor; } - -})(); diff --git a/plugins/tiddlywiki/tw2parser/classictransclude.js b/plugins/tiddlywiki/tw2parser/classictransclude.js index 8afbed60cb..6c91cd1060 100644 --- a/plugins/tiddlywiki/tw2parser/classictransclude.js +++ b/plugins/tiddlywiki/tw2parser/classictransclude.js @@ -6,10 +6,7 @@ module-type: widget Transclude widget \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; var sliceSeparator = "::"; var sectionSeparator = "##"; @@ -191,5 +188,3 @@ TranscludeWidget.prototype.refresh = function(changedTiddlers) { }; exports.classictransclude = TranscludeWidget; - -})(); diff --git a/plugins/tiddlywiki/tw2parser/entry.js b/plugins/tiddlywiki/tw2parser/entry.js index 073221b8ba..b4d654a4f8 100644 --- a/plugins/tiddlywiki/tw2parser/entry.js +++ b/plugins/tiddlywiki/tw2parser/entry.js @@ -3,9 +3,6 @@ title: $:/macros/tiddlywiki/entry.js type: application/javascript module-type: macro \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; /* Information about this macro @@ -27,4 +24,3 @@ exports.run = function(key,map) { return ""; } } -})(); diff --git a/plugins/tiddlywiki/tw2parser/parameteradapter.js b/plugins/tiddlywiki/tw2parser/parameteradapter.js index 7dc8e751da..3580ba7e3b 100644 --- a/plugins/tiddlywiki/tw2parser/parameteradapter.js +++ b/plugins/tiddlywiki/tw2parser/parameteradapter.js @@ -3,10 +3,7 @@ title: $:/macros/classic/macroadapter.js type: application/javascript module-type: module \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; /* Information about this module: @@ -94,4 +91,3 @@ var paramadapter = { exports.name = 'macroadapter'; exports.namedapter = namedapter; exports.paramadapter = paramadapter; -})(); diff --git a/plugins/tiddlywiki/tw2parser/wikitextparser.js b/plugins/tiddlywiki/tw2parser/wikitextparser.js index fec58f3bdf..81b56f94fb 100644 --- a/plugins/tiddlywiki/tw2parser/wikitextparser.js +++ b/plugins/tiddlywiki/tw2parser/wikitextparser.js @@ -28,10 +28,7 @@ HTML nodes look like this: ` \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; /* @@ -196,5 +193,3 @@ WikiTextParser.prototype.subWikifyTerm = function(output,terminatorRegExp) { }; exports["text/x-tiddlywiki"] = WikiTextParser; - -})(); diff --git a/plugins/tiddlywiki/tw2parser/wikitextrules.js b/plugins/tiddlywiki/tw2parser/wikitextrules.js index 068bb97573..1b590d3145 100755 --- a/plugins/tiddlywiki/tw2parser/wikitextrules.js +++ b/plugins/tiddlywiki/tw2parser/wikitextrules.js @@ -6,10 +6,7 @@ module-type: module Rule modules for the wikitext parser \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; var macroadapter = require("$:/macros/classic/macroadapter.js"); var textPrimitives = { @@ -824,5 +821,3 @@ var rules = [ ]; exports.rules = rules; - -})(); diff --git a/plugins/tiddlywiki/twitter-archivist/archivist.js b/plugins/tiddlywiki/twitter-archivist/archivist.js index e0ffe2d52e..69b7e8153b 100644 --- a/plugins/tiddlywiki/twitter-archivist/archivist.js +++ b/plugins/tiddlywiki/twitter-archivist/archivist.js @@ -6,10 +6,7 @@ module-type: utils Utility class for manipulating Twitter archives \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; function TwitterArchivist(options) { @@ -315,5 +312,3 @@ function arrayBufferToBase64(arrayBuffer) { exports.TwitterArchivist = TwitterArchivist; exports.TwitterArchivistSourceNodeJs = TwitterArchivistSourceNodeJs; exports.TwitterArchivistSourceBrowser = TwitterArchivistSourceBrowser; - -})(); diff --git a/plugins/tiddlywiki/twitter-archivist/loadtwitterarchive.js b/plugins/tiddlywiki/twitter-archivist/loadtwitterarchive.js index 497b82bf59..5874fa3fa3 100644 --- a/plugins/tiddlywiki/twitter-archivist/loadtwitterarchive.js +++ b/plugins/tiddlywiki/twitter-archivist/loadtwitterarchive.js @@ -6,10 +6,7 @@ module-type: command Read tiddlers from an unzipped Twitter archive \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; var widget = require("$:/core/modules/widgets/widget.js"); @@ -49,5 +46,3 @@ Command.prototype.execute = function() { }; exports.Command = Command; - -})(); diff --git a/plugins/tiddlywiki/twitter-archivist/startup.js b/plugins/tiddlywiki/twitter-archivist/startup.js index b87453dda1..47cc47dc72 100644 --- a/plugins/tiddlywiki/twitter-archivist/startup.js +++ b/plugins/tiddlywiki/twitter-archivist/startup.js @@ -6,10 +6,7 @@ module-type: startup Twitter initialisation \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; // Export name and synchronous status @@ -34,5 +31,3 @@ exports.startup = function() { }); }); }; - -})(); diff --git a/plugins/tiddlywiki/twitter/startup.js b/plugins/tiddlywiki/twitter/startup.js index 48d1065418..9a28196a1a 100644 --- a/plugins/tiddlywiki/twitter/startup.js +++ b/plugins/tiddlywiki/twitter/startup.js @@ -6,10 +6,7 @@ module-type: startup Twitter initialisation \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; // Export name and synchronous status @@ -23,5 +20,3 @@ exports.startup = function() { logger.alert("The plugin 'tiddlywiki/twitter' is disabled until this wiki is saved and reloaded again"); } }; - -})(); diff --git a/plugins/tiddlywiki/twitter/twitter-widget.js b/plugins/tiddlywiki/twitter/twitter-widget.js index 0046b7139a..6ee3e785a9 100644 --- a/plugins/tiddlywiki/twitter/twitter-widget.js +++ b/plugins/tiddlywiki/twitter/twitter-widget.js @@ -6,10 +6,7 @@ module-type: widget Twitter widget \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; var Widget = require("$:/core/modules/widgets/widget.js").widget; @@ -140,5 +137,3 @@ TwitterWidget.prototype.refresh = function(changedTiddlers) { }; exports.twitter = TwitterWidget; - -})(); diff --git a/plugins/tiddlywiki/upgrade/config.js b/plugins/tiddlywiki/upgrade/config.js index 0c50f1fa74..4010d53cf1 100644 --- a/plugins/tiddlywiki/upgrade/config.js +++ b/plugins/tiddlywiki/upgrade/config.js @@ -6,10 +6,7 @@ module-type: startup Startup module for configuring the upgrade plugin \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; // Export name and synchronous status @@ -22,5 +19,3 @@ exports.startup = function() { $tw.config.usePasswordVault = true; $tw.config.disableAutoSave = true; }; - -})(); diff --git a/plugins/tiddlywiki/xlsx-utils/deserializer.js b/plugins/tiddlywiki/xlsx-utils/deserializer.js index 250184d23f..b27f41ccdb 100644 --- a/plugins/tiddlywiki/xlsx-utils/deserializer.js +++ b/plugins/tiddlywiki/xlsx-utils/deserializer.js @@ -6,10 +6,7 @@ module-type: tiddlerdeserializer XLSX file deserializer \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; /* @@ -26,5 +23,3 @@ exports["application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"] = f // Return the output tiddlers return importer.getResults(); }; - -})(); diff --git a/plugins/tiddlywiki/xlsx-utils/importer.js b/plugins/tiddlywiki/xlsx-utils/importer.js index 2bb963ab62..28a735e478 100644 --- a/plugins/tiddlywiki/xlsx-utils/importer.js +++ b/plugins/tiddlywiki/xlsx-utils/importer.js @@ -6,10 +6,7 @@ module-type: library Class to import an Excel file \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; var DEFAULT_IMPORT_SPEC_TITLE = "$:/config/plugins/tiddlywiki/xlsx-utils/default-import-spec"; @@ -201,5 +198,3 @@ XLSXImporter.prototype.findColumns = function(sheet,sheetSize) { }; exports.XLSXImporter = XLSXImporter; - -})(); diff --git a/plugins/tiddlywiki/xlsx-utils/startup.js b/plugins/tiddlywiki/xlsx-utils/startup.js index 15772384fe..269a10ff4e 100644 --- a/plugins/tiddlywiki/xlsx-utils/startup.js +++ b/plugins/tiddlywiki/xlsx-utils/startup.js @@ -6,10 +6,7 @@ module-type: startup Initialisation \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; // Export name and synchronous status @@ -25,5 +22,3 @@ exports.startup = function() { logger.alert("The plugin 'xlsx-utils' requires the 'jszip' plugin to be installed"); } }; - -})(); diff --git a/plugins/tiddlywiki/xlsx-utils/xlsx-import-command.js b/plugins/tiddlywiki/xlsx-utils/xlsx-import-command.js index 98773a3c68..b71787c00b 100644 --- a/plugins/tiddlywiki/xlsx-utils/xlsx-import-command.js +++ b/plugins/tiddlywiki/xlsx-utils/xlsx-import-command.js @@ -6,10 +6,7 @@ module-type: command Command to import an xlsx file \*/ -(function(){ -/*jslint node: true, browser: true */ -/*global $tw: false */ "use strict"; exports.info = { @@ -42,5 +39,3 @@ Command.prototype.execute = function() { }; exports.Command = Command; - -})();