mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2026-03-04 06:49:50 +00:00
Compare commits
1 Commits
dynamic-bu
...
testing-st
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6db61ac4dd |
8
.eslintignore
Normal file
8
.eslintignore
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
# Ignore "third party" code whose style we will not change.
|
||||||
|
/boot/sjcl.js
|
||||||
|
/core/modules/utils/base64-utf8/base64-utf8.module.js
|
||||||
|
/core/modules/utils/base64-utf8/base64-utf8.module.min.js
|
||||||
|
/core/modules/utils/diff-match-patch/diff_match_patch.js
|
||||||
|
/core/modules/utils/diff-match-patch/diff_match_patch_uncompressed.js
|
||||||
|
/core/modules/utils/dom/csscolorparser.js
|
||||||
|
/plugins/tiddlywiki/*/files/
|
||||||
317
.eslintrc.json
317
.eslintrc.json
@@ -1,317 +0,0 @@
|
|||||||
{
|
|
||||||
"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"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
286
.eslintrc.yml
Normal file
286
.eslintrc.yml
Normal file
@@ -0,0 +1,286 @@
|
|||||||
|
env:
|
||||||
|
browser: true
|
||||||
|
commonjs: true
|
||||||
|
es2021: true
|
||||||
|
node: true
|
||||||
|
extends: 'eslint:recommended'
|
||||||
|
globals:
|
||||||
|
"$tw": "writable" # temporary
|
||||||
|
parserOptions:
|
||||||
|
ecmaVersion: 5
|
||||||
|
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
|
||||||
|
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: 'off'
|
||||||
|
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: 'off'
|
||||||
|
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:
|
||||||
|
- error
|
||||||
|
- double
|
||||||
|
- avoidEscape: true
|
||||||
|
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'
|
||||||
|
|
||||||
|
# temporary rules
|
||||||
|
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"
|
||||||
16
.github/workflows/ci.yml
vendored
16
.github/workflows/ci.yml
vendored
@@ -5,17 +5,17 @@ on:
|
|||||||
- master
|
- master
|
||||||
- tiddlywiki-com
|
- tiddlywiki-com
|
||||||
env:
|
env:
|
||||||
NODE_VERSION: "22"
|
NODE_VERSION: "18"
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
test:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v2
|
||||||
- uses: actions/setup-node@v4
|
- uses: actions/setup-node@v1
|
||||||
with:
|
with:
|
||||||
node-version: "${{ env.NODE_VERSION }}"
|
node-version: "${{ env.NODE_VERSION }}"
|
||||||
- run: "./bin/ci-test.sh"
|
- run: "./bin/ci-test.sh"
|
||||||
- uses: actions/upload-artifact@v4
|
- uses: actions/upload-artifact@v3
|
||||||
if: always()
|
if: always()
|
||||||
with:
|
with:
|
||||||
name: playwright-report
|
name: playwright-report
|
||||||
@@ -30,8 +30,8 @@ jobs:
|
|||||||
TW5_BUILD_MAIN_EDITION: "./editions/prerelease"
|
TW5_BUILD_MAIN_EDITION: "./editions/prerelease"
|
||||||
TW5_BUILD_OUTPUT: "./output/prerelease"
|
TW5_BUILD_OUTPUT: "./output/prerelease"
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v2
|
||||||
- uses: actions/setup-node@v4
|
- uses: actions/setup-node@v1
|
||||||
with:
|
with:
|
||||||
node-version: "${{ env.NODE_VERSION }}"
|
node-version: "${{ env.NODE_VERSION }}"
|
||||||
- run: "./bin/ci-pre-build.sh"
|
- run: "./bin/ci-pre-build.sh"
|
||||||
@@ -62,8 +62,8 @@ jobs:
|
|||||||
TW5_BUILD_OUTPUT: "./output"
|
TW5_BUILD_OUTPUT: "./output"
|
||||||
TW5_BUILD_ARCHIVE: "./output"
|
TW5_BUILD_ARCHIVE: "./output"
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v2
|
||||||
- uses: actions/setup-node@v4
|
- uses: actions/setup-node@v1
|
||||||
with:
|
with:
|
||||||
node-version: "${{ env.NODE_VERSION }}"
|
node-version: "${{ env.NODE_VERSION }}"
|
||||||
- run: "./bin/ci-pre-build.sh"
|
- run: "./bin/ci-pre-build.sh"
|
||||||
|
|||||||
2
.github/workflows/cla-check.yml
vendored
2
.github/workflows/cla-check.yml
vendored
@@ -14,7 +14,7 @@ jobs:
|
|||||||
if: ${{ (github.event.pull_request.user.login != github.repository_owner) }}
|
if: ${{ (github.event.pull_request.user.login != github.repository_owner) }}
|
||||||
steps:
|
steps:
|
||||||
- run: |
|
- run: |
|
||||||
if ! curl -s https://raw.githubusercontent.com/Jermolene/TiddlyWiki5/tiddlywiki-com/licenses/cla-individual.md | grep -io "@$USER,"; then
|
if ! curl -s https://raw.githubusercontent.com/Jermolene/TiddlyWiki5/tiddlywiki-com/licenses/cla-individual.md | grep -o "@$USER,"; then
|
||||||
echo "CLA not signed"
|
echo "CLA not signed"
|
||||||
gh pr comment "$NUMBER" -b "@$USER It appears that this is your first contribution to the project, welcome.
|
gh pr comment "$NUMBER" -b "@$USER It appears that this is your first contribution to the project, welcome.
|
||||||
|
|
||||||
|
|||||||
4
.github/workflows/cla-signed.yml
vendored
4
.github/workflows/cla-signed.yml
vendored
@@ -23,8 +23,8 @@ jobs:
|
|||||||
pull-requests: write
|
pull-requests: write
|
||||||
steps:
|
steps:
|
||||||
- run: |
|
- run: |
|
||||||
if [[ "$BRANCH" != "tiddlywiki-com" ]]; then
|
if ! $BRANCH == "tiddlywiki-com"; then
|
||||||
echo "This CLA signature targets the wrong branch: $BRANCH"
|
echo "This CLA signature targets the wrong branch"
|
||||||
gh pr comment "$NUMBER" -b "@$AUTHOR Signatures to the CLA must target the 'tiddlywiki-com' branch."
|
gh pr comment "$NUMBER" -b "@$AUTHOR Signatures to the CLA must target the 'tiddlywiki-com' branch."
|
||||||
fi
|
fi
|
||||||
env:
|
env:
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
# Default to the current version number for building the plugin library
|
# Default to the current version number for building the plugin library
|
||||||
|
|
||||||
if [ -z "$TW5_BUILD_VERSION" ]; then
|
if [ -z "$TW5_BUILD_VERSION" ]; then
|
||||||
TW5_BUILD_VERSION=v5.3.7
|
TW5_BUILD_VERSION=v5.3.6
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Using TW5_BUILD_VERSION as [$TW5_BUILD_VERSION]"
|
echo "Using TW5_BUILD_VERSION as [$TW5_BUILD_VERSION]"
|
||||||
@@ -97,6 +97,7 @@ if [ -n "$TW5_BUILD_ARCHIVE" ]; then
|
|||||||
|
|
||||||
node $TW5_BUILD_TIDDLYWIKI \
|
node $TW5_BUILD_TIDDLYWIKI \
|
||||||
$TW5_BUILD_MAIN_EDITION \
|
$TW5_BUILD_MAIN_EDITION \
|
||||||
|
--verbose \
|
||||||
--version \
|
--version \
|
||||||
--load $TW5_BUILD_OUTPUT/build.tid \
|
--load $TW5_BUILD_OUTPUT/build.tid \
|
||||||
--output $TW5_BUILD_ARCHIVE \
|
--output $TW5_BUILD_ARCHIVE \
|
||||||
@@ -114,6 +115,7 @@ fi
|
|||||||
|
|
||||||
node $TW5_BUILD_TIDDLYWIKI \
|
node $TW5_BUILD_TIDDLYWIKI \
|
||||||
$TW5_BUILD_MAIN_EDITION \
|
$TW5_BUILD_MAIN_EDITION \
|
||||||
|
--verbose \
|
||||||
--version \
|
--version \
|
||||||
--load $TW5_BUILD_OUTPUT/build.tid \
|
--load $TW5_BUILD_OUTPUT/build.tid \
|
||||||
--output $TW5_BUILD_OUTPUT \
|
--output $TW5_BUILD_OUTPUT \
|
||||||
@@ -126,6 +128,7 @@ node $TW5_BUILD_TIDDLYWIKI \
|
|||||||
# /tiddlywikicore-<version>.js Core plugin javascript
|
# /tiddlywikicore-<version>.js Core plugin javascript
|
||||||
node $TW5_BUILD_TIDDLYWIKI \
|
node $TW5_BUILD_TIDDLYWIKI \
|
||||||
./editions/empty \
|
./editions/empty \
|
||||||
|
--verbose \
|
||||||
--output $TW5_BUILD_OUTPUT \
|
--output $TW5_BUILD_OUTPUT \
|
||||||
--build empty emptyexternalcore \
|
--build empty emptyexternalcore \
|
||||||
|| exit 1
|
|| exit 1
|
||||||
@@ -134,6 +137,7 @@ node $TW5_BUILD_TIDDLYWIKI \
|
|||||||
# /test.html Test edition
|
# /test.html Test edition
|
||||||
node $TW5_BUILD_TIDDLYWIKI \
|
node $TW5_BUILD_TIDDLYWIKI \
|
||||||
./editions/test \
|
./editions/test \
|
||||||
|
--verbose \
|
||||||
--output $TW5_BUILD_OUTPUT \
|
--output $TW5_BUILD_OUTPUT \
|
||||||
--rendertiddler $:/core/save/all test.html text/plain \
|
--rendertiddler $:/core/save/all test.html text/plain \
|
||||||
|| exit 1
|
|| exit 1
|
||||||
@@ -146,6 +150,7 @@ node $TW5_BUILD_TIDDLYWIKI \
|
|||||||
# /dev/static/static.css Static stylesheet
|
# /dev/static/static.css Static stylesheet
|
||||||
node $TW5_BUILD_TIDDLYWIKI \
|
node $TW5_BUILD_TIDDLYWIKI \
|
||||||
./editions/dev \
|
./editions/dev \
|
||||||
|
--verbose \
|
||||||
--load $TW5_BUILD_OUTPUT/build.tid \
|
--load $TW5_BUILD_OUTPUT/build.tid \
|
||||||
--output $TW5_BUILD_OUTPUT/dev \
|
--output $TW5_BUILD_OUTPUT/dev \
|
||||||
--build index favicon static \
|
--build index favicon static \
|
||||||
@@ -154,13 +159,29 @@ node $TW5_BUILD_TIDDLYWIKI \
|
|||||||
# /tour.html tour edition
|
# /tour.html tour edition
|
||||||
node $TW5_BUILD_TIDDLYWIKI \
|
node $TW5_BUILD_TIDDLYWIKI \
|
||||||
./editions/tour \
|
./editions/tour \
|
||||||
|
--verbose \
|
||||||
--output $TW5_BUILD_OUTPUT \
|
--output $TW5_BUILD_OUTPUT \
|
||||||
--rendertiddler $:/core/save/all tour.html text/plain \
|
--rendertiddler $:/core/save/all tour.html text/plain \
|
||||||
|| exit 1
|
|| exit 1
|
||||||
|
|
||||||
|
# /dev/index.html Developer docs
|
||||||
|
# /dev/favicon.ico Favicon for dev site
|
||||||
|
# /dev/static.html Static rendering of default tiddlers
|
||||||
|
# /dev/alltiddlers.html Static rendering of all tiddlers
|
||||||
|
# /dev/static/* Static single tiddlers
|
||||||
|
# /dev/static/static.css Static stylesheet
|
||||||
|
node $TW5_BUILD_TIDDLYWIKI \
|
||||||
|
./editions/dev \
|
||||||
|
--verbose \
|
||||||
|
--load $TW5_BUILD_OUTPUT/build.tid \
|
||||||
|
--output $TW5_BUILD_OUTPUT/dev \
|
||||||
|
--build index favicon static \
|
||||||
|
|| exit 1
|
||||||
|
|
||||||
# /share.html Custom edition for sharing via the URL
|
# /share.html Custom edition for sharing via the URL
|
||||||
node $TW5_BUILD_TIDDLYWIKI \
|
node $TW5_BUILD_TIDDLYWIKI \
|
||||||
./editions/share \
|
./editions/share \
|
||||||
|
--verbose \
|
||||||
--load $TW5_BUILD_OUTPUT/build.tid \
|
--load $TW5_BUILD_OUTPUT/build.tid \
|
||||||
--output $TW5_BUILD_OUTPUT \
|
--output $TW5_BUILD_OUTPUT \
|
||||||
--build share \
|
--build share \
|
||||||
@@ -169,6 +190,7 @@ node $TW5_BUILD_TIDDLYWIKI \
|
|||||||
# /upgrade.html Custom edition for performing upgrades
|
# /upgrade.html Custom edition for performing upgrades
|
||||||
node $TW5_BUILD_TIDDLYWIKI \
|
node $TW5_BUILD_TIDDLYWIKI \
|
||||||
./editions/upgrade \
|
./editions/upgrade \
|
||||||
|
--verbose \
|
||||||
--load $TW5_BUILD_OUTPUT/build.tid \
|
--load $TW5_BUILD_OUTPUT/build.tid \
|
||||||
--output $TW5_BUILD_OUTPUT \
|
--output $TW5_BUILD_OUTPUT \
|
||||||
--build upgrade \
|
--build upgrade \
|
||||||
@@ -177,6 +199,7 @@ node $TW5_BUILD_TIDDLYWIKI \
|
|||||||
# /encrypted.html Copy of the main file encrypted with the password "password"
|
# /encrypted.html Copy of the main file encrypted with the password "password"
|
||||||
node $TW5_BUILD_TIDDLYWIKI \
|
node $TW5_BUILD_TIDDLYWIKI \
|
||||||
$TW5_BUILD_MAIN_EDITION \
|
$TW5_BUILD_MAIN_EDITION \
|
||||||
|
--verbose \
|
||||||
--load $TW5_BUILD_OUTPUT/build.tid \
|
--load $TW5_BUILD_OUTPUT/build.tid \
|
||||||
--output $TW5_BUILD_OUTPUT \
|
--output $TW5_BUILD_OUTPUT \
|
||||||
--build encrypted \
|
--build encrypted \
|
||||||
@@ -192,6 +215,7 @@ node $TW5_BUILD_TIDDLYWIKI \
|
|||||||
# /editions/xlsx-utils/index.html xlsx-utils edition
|
# /editions/xlsx-utils/index.html xlsx-utils edition
|
||||||
node $TW5_BUILD_TIDDLYWIKI \
|
node $TW5_BUILD_TIDDLYWIKI \
|
||||||
./editions/xlsx-utils \
|
./editions/xlsx-utils \
|
||||||
|
--verbose \
|
||||||
--load $TW5_BUILD_OUTPUT/build.tid \
|
--load $TW5_BUILD_OUTPUT/build.tid \
|
||||||
--output $TW5_BUILD_OUTPUT/editions/xlsx-utils/ \
|
--output $TW5_BUILD_OUTPUT/editions/xlsx-utils/ \
|
||||||
--build index \
|
--build index \
|
||||||
@@ -200,6 +224,7 @@ node $TW5_BUILD_TIDDLYWIKI \
|
|||||||
# /editions/resumebuilder/index.html Resume builder edition
|
# /editions/resumebuilder/index.html Resume builder edition
|
||||||
node $TW5_BUILD_TIDDLYWIKI \
|
node $TW5_BUILD_TIDDLYWIKI \
|
||||||
./editions/resumebuilder \
|
./editions/resumebuilder \
|
||||||
|
--verbose \
|
||||||
--load $TW5_BUILD_OUTPUT/build.tid \
|
--load $TW5_BUILD_OUTPUT/build.tid \
|
||||||
--output $TW5_BUILD_OUTPUT/editions/resumebuilder/ \
|
--output $TW5_BUILD_OUTPUT/editions/resumebuilder/ \
|
||||||
--build index \
|
--build index \
|
||||||
@@ -208,6 +233,7 @@ node $TW5_BUILD_TIDDLYWIKI \
|
|||||||
# /editions/text-slicer/index.html Text slicer edition
|
# /editions/text-slicer/index.html Text slicer edition
|
||||||
node $TW5_BUILD_TIDDLYWIKI \
|
node $TW5_BUILD_TIDDLYWIKI \
|
||||||
./editions/text-slicer \
|
./editions/text-slicer \
|
||||||
|
--verbose \
|
||||||
--load $TW5_BUILD_OUTPUT/build.tid \
|
--load $TW5_BUILD_OUTPUT/build.tid \
|
||||||
--output $TW5_BUILD_OUTPUT/editions/text-slicer/ \
|
--output $TW5_BUILD_OUTPUT/editions/text-slicer/ \
|
||||||
--build index \
|
--build index \
|
||||||
@@ -216,6 +242,7 @@ node $TW5_BUILD_TIDDLYWIKI \
|
|||||||
# /editions/translators/index.html Translators edition
|
# /editions/translators/index.html Translators edition
|
||||||
node $TW5_BUILD_TIDDLYWIKI \
|
node $TW5_BUILD_TIDDLYWIKI \
|
||||||
./editions/translators \
|
./editions/translators \
|
||||||
|
--verbose \
|
||||||
--load $TW5_BUILD_OUTPUT/build.tid \
|
--load $TW5_BUILD_OUTPUT/build.tid \
|
||||||
--output $TW5_BUILD_OUTPUT/editions/translators/ \
|
--output $TW5_BUILD_OUTPUT/editions/translators/ \
|
||||||
--build index \
|
--build index \
|
||||||
@@ -224,6 +251,7 @@ node $TW5_BUILD_TIDDLYWIKI \
|
|||||||
# /editions/introduction/index.html Introduction edition
|
# /editions/introduction/index.html Introduction edition
|
||||||
node $TW5_BUILD_TIDDLYWIKI \
|
node $TW5_BUILD_TIDDLYWIKI \
|
||||||
./editions/introduction \
|
./editions/introduction \
|
||||||
|
--verbose \
|
||||||
--load $TW5_BUILD_OUTPUT/build.tid \
|
--load $TW5_BUILD_OUTPUT/build.tid \
|
||||||
--output $TW5_BUILD_OUTPUT/editions/introduction/ \
|
--output $TW5_BUILD_OUTPUT/editions/introduction/ \
|
||||||
--build index \
|
--build index \
|
||||||
@@ -232,6 +260,7 @@ node $TW5_BUILD_TIDDLYWIKI \
|
|||||||
# /editions/full/index.html Full edition
|
# /editions/full/index.html Full edition
|
||||||
node $TW5_BUILD_TIDDLYWIKI \
|
node $TW5_BUILD_TIDDLYWIKI \
|
||||||
./editions/full \
|
./editions/full \
|
||||||
|
--verbose \
|
||||||
--load $TW5_BUILD_OUTPUT/build.tid \
|
--load $TW5_BUILD_OUTPUT/build.tid \
|
||||||
--output $TW5_BUILD_OUTPUT/editions/full/ \
|
--output $TW5_BUILD_OUTPUT/editions/full/ \
|
||||||
--build index \
|
--build index \
|
||||||
@@ -240,6 +269,7 @@ node $TW5_BUILD_TIDDLYWIKI \
|
|||||||
# /editions/tw5.com-docs/index.html tiddlywiki.com docs edition
|
# /editions/tw5.com-docs/index.html tiddlywiki.com docs edition
|
||||||
node $TW5_BUILD_TIDDLYWIKI \
|
node $TW5_BUILD_TIDDLYWIKI \
|
||||||
./editions/tw5.com-docs \
|
./editions/tw5.com-docs \
|
||||||
|
--verbose \
|
||||||
--load $TW5_BUILD_OUTPUT/build.tid \
|
--load $TW5_BUILD_OUTPUT/build.tid \
|
||||||
--output $TW5_BUILD_OUTPUT/editions/tw5.com-docs/ \
|
--output $TW5_BUILD_OUTPUT/editions/tw5.com-docs/ \
|
||||||
--build index \
|
--build index \
|
||||||
@@ -248,6 +278,7 @@ node $TW5_BUILD_TIDDLYWIKI \
|
|||||||
# /editions/twitter-archivist/index.html Twitter Archivist edition
|
# /editions/twitter-archivist/index.html Twitter Archivist edition
|
||||||
node $TW5_BUILD_TIDDLYWIKI \
|
node $TW5_BUILD_TIDDLYWIKI \
|
||||||
./editions/twitter-archivist \
|
./editions/twitter-archivist \
|
||||||
|
--verbose \
|
||||||
--load $TW5_BUILD_OUTPUT/build.tid \
|
--load $TW5_BUILD_OUTPUT/build.tid \
|
||||||
--output $TW5_BUILD_OUTPUT/editions/twitter-archivist/ \
|
--output $TW5_BUILD_OUTPUT/editions/twitter-archivist/ \
|
||||||
--build index \
|
--build index \
|
||||||
@@ -263,6 +294,7 @@ node $TW5_BUILD_TIDDLYWIKI \
|
|||||||
|
|
||||||
node $TW5_BUILD_TIDDLYWIKI \
|
node $TW5_BUILD_TIDDLYWIKI \
|
||||||
./editions/innerwikidemo \
|
./editions/innerwikidemo \
|
||||||
|
--verbose \
|
||||||
--load $TW5_BUILD_OUTPUT/build.tid \
|
--load $TW5_BUILD_OUTPUT/build.tid \
|
||||||
--output $TW5_BUILD_OUTPUT \
|
--output $TW5_BUILD_OUTPUT \
|
||||||
--rendertiddler $:/core/save/all plugins/tiddlywiki/innerwiki/index.html text/plain \
|
--rendertiddler $:/core/save/all plugins/tiddlywiki/innerwiki/index.html text/plain \
|
||||||
@@ -273,6 +305,7 @@ node $TW5_BUILD_TIDDLYWIKI \
|
|||||||
|
|
||||||
node $TW5_BUILD_TIDDLYWIKI \
|
node $TW5_BUILD_TIDDLYWIKI \
|
||||||
./editions/dynaviewdemo \
|
./editions/dynaviewdemo \
|
||||||
|
--verbose \
|
||||||
--load $TW5_BUILD_OUTPUT/build.tid \
|
--load $TW5_BUILD_OUTPUT/build.tid \
|
||||||
--output $TW5_BUILD_OUTPUT \
|
--output $TW5_BUILD_OUTPUT \
|
||||||
--rendertiddler $:/core/save/all plugins/tiddlywiki/dynaview/index.html text/plain \
|
--rendertiddler $:/core/save/all plugins/tiddlywiki/dynaview/index.html text/plain \
|
||||||
@@ -287,6 +320,7 @@ node $TW5_BUILD_TIDDLYWIKI \
|
|||||||
|
|
||||||
node $TW5_BUILD_TIDDLYWIKI \
|
node $TW5_BUILD_TIDDLYWIKI \
|
||||||
./editions/katexdemo \
|
./editions/katexdemo \
|
||||||
|
--verbose \
|
||||||
--load $TW5_BUILD_OUTPUT/build.tid \
|
--load $TW5_BUILD_OUTPUT/build.tid \
|
||||||
--output $TW5_BUILD_OUTPUT \
|
--output $TW5_BUILD_OUTPUT \
|
||||||
--rendertiddler $:/core/save/all plugins/tiddlywiki/katex/index.html text/plain \
|
--rendertiddler $:/core/save/all plugins/tiddlywiki/katex/index.html text/plain \
|
||||||
@@ -297,6 +331,7 @@ node $TW5_BUILD_TIDDLYWIKI \
|
|||||||
# /plugins/tiddlywiki/tahoelafs/empty.html Empty wiki with Tahoe-LAFS plugin
|
# /plugins/tiddlywiki/tahoelafs/empty.html Empty wiki with Tahoe-LAFS plugin
|
||||||
node $TW5_BUILD_TIDDLYWIKI \
|
node $TW5_BUILD_TIDDLYWIKI \
|
||||||
./editions/tahoelafs \
|
./editions/tahoelafs \
|
||||||
|
--verbose \
|
||||||
--load $TW5_BUILD_OUTPUT/build.tid \
|
--load $TW5_BUILD_OUTPUT/build.tid \
|
||||||
--output $TW5_BUILD_OUTPUT \
|
--output $TW5_BUILD_OUTPUT \
|
||||||
--rendertiddler $:/core/save/all plugins/tiddlywiki/tahoelafs/index.html text/plain \
|
--rendertiddler $:/core/save/all plugins/tiddlywiki/tahoelafs/index.html text/plain \
|
||||||
@@ -307,6 +342,7 @@ node $TW5_BUILD_TIDDLYWIKI \
|
|||||||
# /plugins/tiddlywiki/d3/empty.html Empty wiki with D3 plugin
|
# /plugins/tiddlywiki/d3/empty.html Empty wiki with D3 plugin
|
||||||
node $TW5_BUILD_TIDDLYWIKI \
|
node $TW5_BUILD_TIDDLYWIKI \
|
||||||
./editions/d3demo \
|
./editions/d3demo \
|
||||||
|
--verbose \
|
||||||
--load $TW5_BUILD_OUTPUT/build.tid \
|
--load $TW5_BUILD_OUTPUT/build.tid \
|
||||||
--output $TW5_BUILD_OUTPUT \
|
--output $TW5_BUILD_OUTPUT \
|
||||||
--rendertiddler $:/core/save/all plugins/tiddlywiki/d3/index.html text/plain \
|
--rendertiddler $:/core/save/all plugins/tiddlywiki/d3/index.html text/plain \
|
||||||
@@ -317,6 +353,7 @@ node $TW5_BUILD_TIDDLYWIKI \
|
|||||||
# /plugins/tiddlywiki/codemirror/empty.html Empty wiki with codemirror plugin
|
# /plugins/tiddlywiki/codemirror/empty.html Empty wiki with codemirror plugin
|
||||||
node $TW5_BUILD_TIDDLYWIKI \
|
node $TW5_BUILD_TIDDLYWIKI \
|
||||||
./editions/codemirrordemo \
|
./editions/codemirrordemo \
|
||||||
|
--verbose \
|
||||||
--load $TW5_BUILD_OUTPUT/build.tid \
|
--load $TW5_BUILD_OUTPUT/build.tid \
|
||||||
--output $TW5_BUILD_OUTPUT \
|
--output $TW5_BUILD_OUTPUT \
|
||||||
--rendertiddler $:/core/save/all plugins/tiddlywiki/codemirror/index.html text/plain \
|
--rendertiddler $:/core/save/all plugins/tiddlywiki/codemirror/index.html text/plain \
|
||||||
@@ -327,6 +364,7 @@ node $TW5_BUILD_TIDDLYWIKI \
|
|||||||
# /plugins/tiddlywiki/markdown/empty.html Empty wiki with Markdown plugin
|
# /plugins/tiddlywiki/markdown/empty.html Empty wiki with Markdown plugin
|
||||||
node $TW5_BUILD_TIDDLYWIKI \
|
node $TW5_BUILD_TIDDLYWIKI \
|
||||||
./editions/markdowndemo \
|
./editions/markdowndemo \
|
||||||
|
--verbose \
|
||||||
--load $TW5_BUILD_OUTPUT/build.tid \
|
--load $TW5_BUILD_OUTPUT/build.tid \
|
||||||
--output $TW5_BUILD_OUTPUT \
|
--output $TW5_BUILD_OUTPUT \
|
||||||
--rendertiddler $:/core/save/all plugins/tiddlywiki/markdown/index.html text/plain \
|
--rendertiddler $:/core/save/all plugins/tiddlywiki/markdown/index.html text/plain \
|
||||||
@@ -337,6 +375,7 @@ node $TW5_BUILD_TIDDLYWIKI \
|
|||||||
# /plugins/tiddlywiki/tw2parser/empty.html Empty wiki with tw2parser plugin
|
# /plugins/tiddlywiki/tw2parser/empty.html Empty wiki with tw2parser plugin
|
||||||
node $TW5_BUILD_TIDDLYWIKI \
|
node $TW5_BUILD_TIDDLYWIKI \
|
||||||
./editions/classicparserdemo \
|
./editions/classicparserdemo \
|
||||||
|
--verbose \
|
||||||
--load $TW5_BUILD_OUTPUT/build.tid \
|
--load $TW5_BUILD_OUTPUT/build.tid \
|
||||||
--output $TW5_BUILD_OUTPUT \
|
--output $TW5_BUILD_OUTPUT \
|
||||||
--rendertiddler $:/core/save/all plugins/tiddlywiki/tw2parser/index.html text/plain \
|
--rendertiddler $:/core/save/all plugins/tiddlywiki/tw2parser/index.html text/plain \
|
||||||
@@ -347,6 +386,7 @@ node $TW5_BUILD_TIDDLYWIKI \
|
|||||||
# /plugins/tiddlywiki/highlight/empty.html Empty wiki with highlight plugin
|
# /plugins/tiddlywiki/highlight/empty.html Empty wiki with highlight plugin
|
||||||
node $TW5_BUILD_TIDDLYWIKI \
|
node $TW5_BUILD_TIDDLYWIKI \
|
||||||
./editions/highlightdemo \
|
./editions/highlightdemo \
|
||||||
|
--verbose \
|
||||||
--load $TW5_BUILD_OUTPUT/build.tid \
|
--load $TW5_BUILD_OUTPUT/build.tid \
|
||||||
--output $TW5_BUILD_OUTPUT \
|
--output $TW5_BUILD_OUTPUT \
|
||||||
--rendertiddler $:/core/save/all plugins/tiddlywiki/highlight/index.html text/plain \
|
--rendertiddler $:/core/save/all plugins/tiddlywiki/highlight/index.html text/plain \
|
||||||
@@ -357,6 +397,7 @@ node $TW5_BUILD_TIDDLYWIKI \
|
|||||||
# /plugins/tiddlywiki/geospatial/empty.html Empty wiki with geospatial plugin
|
# /plugins/tiddlywiki/geospatial/empty.html Empty wiki with geospatial plugin
|
||||||
node $TW5_BUILD_TIDDLYWIKI \
|
node $TW5_BUILD_TIDDLYWIKI \
|
||||||
./editions/geospatialdemo \
|
./editions/geospatialdemo \
|
||||||
|
--verbose \
|
||||||
--load $TW5_BUILD_OUTPUT/build.tid \
|
--load $TW5_BUILD_OUTPUT/build.tid \
|
||||||
--output $TW5_BUILD_OUTPUT \
|
--output $TW5_BUILD_OUTPUT \
|
||||||
--rendertiddler $:/core/save/all plugins/tiddlywiki/geospatial/index.html text/plain \
|
--rendertiddler $:/core/save/all plugins/tiddlywiki/geospatial/index.html text/plain \
|
||||||
@@ -384,6 +425,7 @@ rm -rf $TW5_BUILD_OUTPUT/languages/zh-Hant/static/*
|
|||||||
# /languages/de-AT/empty.html Empty wiki with de-AT language
|
# /languages/de-AT/empty.html Empty wiki with de-AT language
|
||||||
node $TW5_BUILD_TIDDLYWIKI \
|
node $TW5_BUILD_TIDDLYWIKI \
|
||||||
./editions/de-AT \
|
./editions/de-AT \
|
||||||
|
--verbose \
|
||||||
--load $TW5_BUILD_OUTPUT/build.tid \
|
--load $TW5_BUILD_OUTPUT/build.tid \
|
||||||
--output $TW5_BUILD_OUTPUT/languages/de-AT \
|
--output $TW5_BUILD_OUTPUT/languages/de-AT \
|
||||||
--build favicon empty static index \
|
--build favicon empty static index \
|
||||||
@@ -393,6 +435,7 @@ node $TW5_BUILD_TIDDLYWIKI \
|
|||||||
# /languages/de-DE/empty.html Empty wiki with de-DE language
|
# /languages/de-DE/empty.html Empty wiki with de-DE language
|
||||||
node $TW5_BUILD_TIDDLYWIKI \
|
node $TW5_BUILD_TIDDLYWIKI \
|
||||||
./editions/de-DE \
|
./editions/de-DE \
|
||||||
|
--verbose \
|
||||||
--load $TW5_BUILD_OUTPUT/build.tid \
|
--load $TW5_BUILD_OUTPUT/build.tid \
|
||||||
--output $TW5_BUILD_OUTPUT/languages/de-DE \
|
--output $TW5_BUILD_OUTPUT/languages/de-DE \
|
||||||
--build favicon empty static index \
|
--build favicon empty static index \
|
||||||
@@ -402,6 +445,7 @@ node $TW5_BUILD_TIDDLYWIKI \
|
|||||||
# /languages/es-ES/empty.html Empty wiki with es-ES language
|
# /languages/es-ES/empty.html Empty wiki with es-ES language
|
||||||
node $TW5_BUILD_TIDDLYWIKI \
|
node $TW5_BUILD_TIDDLYWIKI \
|
||||||
./editions/es-ES \
|
./editions/es-ES \
|
||||||
|
--verbose \
|
||||||
--load $TW5_BUILD_OUTPUT/build.tid \
|
--load $TW5_BUILD_OUTPUT/build.tid \
|
||||||
--output $TW5_BUILD_OUTPUT/languages/es-ES \
|
--output $TW5_BUILD_OUTPUT/languages/es-ES \
|
||||||
--build favicon empty static index \
|
--build favicon empty static index \
|
||||||
@@ -411,6 +455,7 @@ node $TW5_BUILD_TIDDLYWIKI \
|
|||||||
# /languages/fr-FR/empty.html Empty wiki with fr-FR language
|
# /languages/fr-FR/empty.html Empty wiki with fr-FR language
|
||||||
node $TW5_BUILD_TIDDLYWIKI \
|
node $TW5_BUILD_TIDDLYWIKI \
|
||||||
./editions/fr-FR \
|
./editions/fr-FR \
|
||||||
|
--verbose \
|
||||||
--load $TW5_BUILD_OUTPUT/build.tid \
|
--load $TW5_BUILD_OUTPUT/build.tid \
|
||||||
--output $TW5_BUILD_OUTPUT/languages/fr-FR \
|
--output $TW5_BUILD_OUTPUT/languages/fr-FR \
|
||||||
--build favicon empty static index \
|
--build favicon empty static index \
|
||||||
@@ -420,6 +465,7 @@ node $TW5_BUILD_TIDDLYWIKI \
|
|||||||
# /languages/ja-JP/empty.html Empty wiki with ja-JP language
|
# /languages/ja-JP/empty.html Empty wiki with ja-JP language
|
||||||
node $TW5_BUILD_TIDDLYWIKI \
|
node $TW5_BUILD_TIDDLYWIKI \
|
||||||
./editions/ja-JP \
|
./editions/ja-JP \
|
||||||
|
--verbose \
|
||||||
--load $TW5_BUILD_OUTPUT/build.tid \
|
--load $TW5_BUILD_OUTPUT/build.tid \
|
||||||
--output $TW5_BUILD_OUTPUT/languages/ja-JP \
|
--output $TW5_BUILD_OUTPUT/languages/ja-JP \
|
||||||
--build empty index \
|
--build empty index \
|
||||||
@@ -429,6 +475,7 @@ node $TW5_BUILD_TIDDLYWIKI \
|
|||||||
# /languages/ko-KR/empty.html Empty wiki with ko-KR language
|
# /languages/ko-KR/empty.html Empty wiki with ko-KR language
|
||||||
node $TW5_BUILD_TIDDLYWIKI \
|
node $TW5_BUILD_TIDDLYWIKI \
|
||||||
./editions/ko-KR \
|
./editions/ko-KR \
|
||||||
|
--verbose \
|
||||||
--load $TW5_BUILD_OUTPUT/build.tid \
|
--load $TW5_BUILD_OUTPUT/build.tid \
|
||||||
--output $TW5_BUILD_OUTPUT/languages/ko-KR \
|
--output $TW5_BUILD_OUTPUT/languages/ko-KR \
|
||||||
--build favicon empty static index \
|
--build favicon empty static index \
|
||||||
@@ -438,6 +485,7 @@ node $TW5_BUILD_TIDDLYWIKI \
|
|||||||
# /languages/zh-Hans/empty.html Empty wiki with zh-Hans language
|
# /languages/zh-Hans/empty.html Empty wiki with zh-Hans language
|
||||||
node $TW5_BUILD_TIDDLYWIKI \
|
node $TW5_BUILD_TIDDLYWIKI \
|
||||||
./editions/zh-Hans \
|
./editions/zh-Hans \
|
||||||
|
--verbose \
|
||||||
--load $TW5_BUILD_OUTPUT/build.tid \
|
--load $TW5_BUILD_OUTPUT/build.tid \
|
||||||
--output $TW5_BUILD_OUTPUT/languages/zh-Hans \
|
--output $TW5_BUILD_OUTPUT/languages/zh-Hans \
|
||||||
--build empty index \
|
--build empty index \
|
||||||
@@ -447,6 +495,7 @@ node $TW5_BUILD_TIDDLYWIKI \
|
|||||||
# /languages/zh-Hant/empty.html Empty wiki with zh-Hant language
|
# /languages/zh-Hant/empty.html Empty wiki with zh-Hant language
|
||||||
node $TW5_BUILD_TIDDLYWIKI \
|
node $TW5_BUILD_TIDDLYWIKI \
|
||||||
./editions/zh-Hant \
|
./editions/zh-Hant \
|
||||||
|
--verbose \
|
||||||
--load $TW5_BUILD_OUTPUT/build.tid \
|
--load $TW5_BUILD_OUTPUT/build.tid \
|
||||||
--output $TW5_BUILD_OUTPUT/languages/zh-Hant \
|
--output $TW5_BUILD_OUTPUT/languages/zh-Hant \
|
||||||
--build empty index \
|
--build empty index \
|
||||||
@@ -460,6 +509,7 @@ node $TW5_BUILD_TIDDLYWIKI \
|
|||||||
|
|
||||||
node $TW5_BUILD_TIDDLYWIKI \
|
node $TW5_BUILD_TIDDLYWIKI \
|
||||||
./editions/pluginlibrary \
|
./editions/pluginlibrary \
|
||||||
|
--verbose \
|
||||||
--load $TW5_BUILD_OUTPUT/build.tid \
|
--load $TW5_BUILD_OUTPUT/build.tid \
|
||||||
--output $TW5_BUILD_OUTPUT/library/$TW5_BUILD_VERSION \
|
--output $TW5_BUILD_OUTPUT/library/$TW5_BUILD_VERSION \
|
||||||
--build library\
|
--build library\
|
||||||
|
|||||||
42
boot/boot.js
42
boot/boot.js
@@ -232,10 +232,10 @@ $tw.utils.error = function(err) {
|
|||||||
var link = dm("a"),
|
var link = dm("a"),
|
||||||
text = JSON.stringify(tiddlers);
|
text = JSON.stringify(tiddlers);
|
||||||
if(Blob !== undefined) {
|
if(Blob !== undefined) {
|
||||||
var blob = new Blob([text], {type: "application/json"});
|
var blob = new Blob([text], {type: "text/html"});
|
||||||
link.setAttribute("href", URL.createObjectURL(blob));
|
link.setAttribute("href", URL.createObjectURL(blob));
|
||||||
} else {
|
} else {
|
||||||
link.setAttribute("href","data:application/json," + encodeURIComponent(text));
|
link.setAttribute("href","data:text/html," + encodeURIComponent(text));
|
||||||
}
|
}
|
||||||
link.setAttribute("download","emergency-tiddlers-" + (new Date()) + ".json");
|
link.setAttribute("download","emergency-tiddlers-" + (new Date()) + ".json");
|
||||||
document.body.appendChild(link);
|
document.body.appendChild(link);
|
||||||
@@ -1470,15 +1470,17 @@ $tw.Wiki = function(options) {
|
|||||||
// Unpack the currently registered plugins, creating shadow tiddlers for their constituent tiddlers
|
// Unpack the currently registered plugins, creating shadow tiddlers for their constituent tiddlers
|
||||||
this.unpackPluginTiddlers = function() {
|
this.unpackPluginTiddlers = function() {
|
||||||
var self = this;
|
var self = this;
|
||||||
// Sort the plugin titles by the `plugin-priority` field, if this field is missing, default to 1
|
// Sort the plugin titles by the `plugin-priority` field
|
||||||
pluginTiddlers.sort(function(a, b) {
|
pluginTiddlers.sort(function(a,b) {
|
||||||
var priorityA = "plugin-priority" in a.fields ? a.fields["plugin-priority"] : 1;
|
if("plugin-priority" in a.fields && "plugin-priority" in b.fields) {
|
||||||
var priorityB = "plugin-priority" in b.fields ? b.fields["plugin-priority"] : 1;
|
return a.fields["plugin-priority"] - b.fields["plugin-priority"];
|
||||||
if (priorityA !== priorityB) {
|
} else if("plugin-priority" in a.fields) {
|
||||||
return priorityA - priorityB;
|
|
||||||
} else if (a.fields.title < b.fields.title) {
|
|
||||||
return -1;
|
return -1;
|
||||||
} else if (a.fields.title === b.fields.title) {
|
} else if("plugin-priority" in b.fields) {
|
||||||
|
return +1;
|
||||||
|
} else if(a.fields.title < b.fields.title) {
|
||||||
|
return -1;
|
||||||
|
} else if(a.fields.title === b.fields.title) {
|
||||||
return 0;
|
return 0;
|
||||||
} else {
|
} else {
|
||||||
return +1;
|
return +1;
|
||||||
@@ -1902,16 +1904,8 @@ $tw.loadTiddlersFromFile = function(filepath,fields) {
|
|||||||
extensionInfo = $tw.utils.getFileExtensionInfo(ext),
|
extensionInfo = $tw.utils.getFileExtensionInfo(ext),
|
||||||
type = extensionInfo ? extensionInfo.type : null,
|
type = extensionInfo ? extensionInfo.type : null,
|
||||||
typeInfo = type ? $tw.config.contentTypeInfo[type] : null,
|
typeInfo = type ? $tw.config.contentTypeInfo[type] : null,
|
||||||
fileSize = fs.statSync(filepath).size,
|
data = fs.readFileSync(filepath,typeInfo ? typeInfo.encoding : "utf8"),
|
||||||
data;
|
tiddlers = $tw.wiki.deserializeTiddlers(ext,data,fields),
|
||||||
if(fileSize > $tw.config.maxEditFileSize) {
|
|
||||||
data = "File " + filepath + "not loaded because it is too large";
|
|
||||||
console.log("Warning: " + data);
|
|
||||||
ext = ".txt";
|
|
||||||
} else {
|
|
||||||
data = fs.readFileSync(filepath,typeInfo ? typeInfo.encoding : "utf8");
|
|
||||||
}
|
|
||||||
var tiddlers = $tw.wiki.deserializeTiddlers(ext,data,fields),
|
|
||||||
metadata = $tw.loadMetadataForFile(filepath);
|
metadata = $tw.loadMetadataForFile(filepath);
|
||||||
if(metadata) {
|
if(metadata) {
|
||||||
if(type === "application/json") {
|
if(type === "application/json") {
|
||||||
@@ -2471,15 +2465,13 @@ $tw.boot.initStartup = function(options) {
|
|||||||
$tw.utils.registerFileType("image/webp","base64",".webp",{flags:["image"]});
|
$tw.utils.registerFileType("image/webp","base64",".webp",{flags:["image"]});
|
||||||
$tw.utils.registerFileType("image/heic","base64",".heic",{flags:["image"]});
|
$tw.utils.registerFileType("image/heic","base64",".heic",{flags:["image"]});
|
||||||
$tw.utils.registerFileType("image/heif","base64",".heif",{flags:["image"]});
|
$tw.utils.registerFileType("image/heif","base64",".heif",{flags:["image"]});
|
||||||
$tw.utils.registerFileType("image/avif","base64",".avif",{flags:["image"]});
|
|
||||||
$tw.utils.registerFileType("image/svg+xml","utf8",".svg",{flags:["image"]});
|
$tw.utils.registerFileType("image/svg+xml","utf8",".svg",{flags:["image"]});
|
||||||
$tw.utils.registerFileType("image/vnd.microsoft.icon","base64",".ico",{flags:["image"]});
|
$tw.utils.registerFileType("image/vnd.microsoft.icon","base64",".ico",{flags:["image"]});
|
||||||
$tw.utils.registerFileType("image/x-icon","base64",".ico",{flags:["image"]});
|
$tw.utils.registerFileType("image/x-icon","base64",".ico",{flags:["image"]});
|
||||||
$tw.utils.registerFileType("application/wasm","base64",".wasm");
|
$tw.utils.registerFileType("application/wasm","base64",".wasm");
|
||||||
$tw.utils.registerFileType("font/woff","base64",".woff");
|
$tw.utils.registerFileType("application/font-woff","base64",".woff");
|
||||||
$tw.utils.registerFileType("font/woff2","base64",".woff2");
|
$tw.utils.registerFileType("application/x-font-ttf","base64",".woff");
|
||||||
$tw.utils.registerFileType("font/ttf","base64",".ttf");
|
$tw.utils.registerFileType("application/font-woff2","base64",".woff2");
|
||||||
$tw.utils.registerFileType("font/otf","base64",".otf");
|
|
||||||
$tw.utils.registerFileType("audio/ogg","base64",".ogg");
|
$tw.utils.registerFileType("audio/ogg","base64",".ogg");
|
||||||
$tw.utils.registerFileType("audio/mp4","base64",[".mp4",".m4a"]);
|
$tw.utils.registerFileType("audio/mp4","base64",[".mp4",".m4a"]);
|
||||||
$tw.utils.registerFileType("video/ogg","base64",[".ogm",".ogv",".ogg"]);
|
$tw.utils.registerFileType("video/ogg","base64",[".ogm",".ogv",".ogg"]);
|
||||||
|
|||||||
@@ -19,10 +19,6 @@ var _bootprefix = (function($tw) {
|
|||||||
$tw = $tw || Object.create(null);
|
$tw = $tw || Object.create(null);
|
||||||
$tw.boot = $tw.boot || Object.create(null);
|
$tw.boot = $tw.boot || Object.create(null);
|
||||||
|
|
||||||
// Config
|
|
||||||
$tw.config = $tw.config || Object.create(null);
|
|
||||||
$tw.config.maxEditFileSize = 100 * 1024 * 1024; // 100MB
|
|
||||||
|
|
||||||
// Detect platforms
|
// Detect platforms
|
||||||
if(!("browser" in $tw)) {
|
if(!("browser" in $tw)) {
|
||||||
$tw.browser = typeof(window) !== "undefined" && typeof(document) !== "undefined" ? {} : null;
|
$tw.browser = typeof(window) !== "undefined" && typeof(document) !== "undefined" ? {} : null;
|
||||||
|
|||||||
@@ -5,3 +5,7 @@ TiddlyWiki incorporates code from these fine OpenSource projects:
|
|||||||
* [[The Stanford Javascript Crypto Library|http://bitwiseshiftleft.github.io/sjcl/]]
|
* [[The Stanford Javascript Crypto Library|http://bitwiseshiftleft.github.io/sjcl/]]
|
||||||
* [[The Jasmine JavaScript Test Framework|https://jasmine.github.io/]]
|
* [[The Jasmine JavaScript Test Framework|https://jasmine.github.io/]]
|
||||||
* [[Normalize.css by Nicolas Gallagher|http://necolas.github.io/normalize.css/]]
|
* [[Normalize.css by Nicolas Gallagher|http://necolas.github.io/normalize.css/]]
|
||||||
|
|
||||||
|
And media from these projects:
|
||||||
|
|
||||||
|
* World flag icons from [[Wikipedia|http://commons.wikimedia.org/wiki/Category:SVG_flags_by_country]]
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ type: text/plain
|
|||||||
TiddlyWiki created by Jeremy Ruston, (jeremy [at] jermolene [dot] com)
|
TiddlyWiki created by Jeremy Ruston, (jeremy [at] jermolene [dot] com)
|
||||||
|
|
||||||
Copyright (c) 2004-2007, Jeremy Ruston
|
Copyright (c) 2004-2007, Jeremy Ruston
|
||||||
Copyright (c) 2007-2025, UnaMesa Association
|
Copyright (c) 2007-2024, UnaMesa Association
|
||||||
All rights reserved.
|
All rights reserved.
|
||||||
|
|
||||||
Redistribution and use in source and binary forms, with or without
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
|||||||
@@ -1,5 +0,0 @@
|
|||||||
title: $:/core/images/language
|
|
||||||
tags: $:/tags/Image
|
|
||||||
|
|
||||||
\parameters (size:"22pt")
|
|
||||||
<svg width=<<size>> height=<<size>> class="tc-image-language tc-image-button" viewBox="0 0 92 92"><path d="M0 0h2480.32v3507.87H0z" style="fill:none" transform="scale(.03696 .02613)"/><path d="M71.508 62.298c-1.243 15.83-16.758 28.344-35.714 28.344-5.713 0-11.113-1.136-15.905-3.158-2.977 2.498-8.618 4.183-15.088 4.183-.929 0-1.84-.034-2.73-.102 4.499-1.5 7.989-4.886 9.298-9.099C4.373 76.918 0 69.016 0 60.246 0 49.773 6.237 40.537 15.729 35.07c1.235 7.764 5.492 14.713 11.724 19.953l-7.269 18.453c-.393.976-.676 1.737-.847 2.285a5.326 5.326 0 0 0-.256 1.591c0 .89.368 1.686 1.103 2.388.736.702 1.583 1.052 2.542 1.052 1.13 0 1.942-.33 2.438-.988.497-.659 1.096-1.93 1.797-3.812l1.797-4.826h15.3l1.797 4.723c.239.582.526 1.254.86 2.015.333.762.646 1.327.936 1.695.291.368.65.659 1.078.873.428.213.942.32 1.54.32a3.586 3.586 0 0 0 2.632-1.09c.727-.728 1.09-1.528 1.09-2.4 0-.84-.384-2.183-1.154-4.031l-3.545-8.755c2.142.3 4.34.455 6.58.455 5.541 0 10.824-.951 15.636-2.674Zm-30.563.247 1.059 2.898H30.76l2.32-6.467a43.152 43.152 0 0 0 7.865 3.569Z"/><path d="M71.778 57.635c-4.793 2.023-10.191 3.157-15.907 3.157-19.767 0-35.793-13.61-35.793-30.396S36.104.001 55.87.001c19.772 0 35.797 13.61 35.797 30.395 0 8.77-4.373 16.674-11.371 22.221 1.309 4.211 4.8 7.6 9.299 9.1-.89.067-1.802.1-2.73.1-6.47 0-12.11-1.686-15.088-4.182Zm-15.59-15.887a44.237 44.237 0 0 0 3.3 2.496c4.284 2.942 9.06 5.381 14.33 7.315l2.334-3.517c-5.134-1.871-9.696-4.125-13.69-6.763a42.558 42.558 0 0 1-3.37-2.483c4.247-4.806 7.374-10.43 9.38-16.869h6.698V17.78h-16.7a47.226 47.226 0 0 0-1.528-2.959 52.943 52.943 0 0 0-2.885-4.562l-4.218 1.554a36.467 36.467 0 0 1 2.971 3.983c.427.661.833 1.323 1.217 1.984H36.394v4.148h6.77a36.878 36.878 0 0 0 5.422 11.56 42.918 42.918 0 0 0 4.591 5.497c-4.687 4.017-10.548 6.932-17.582 8.744l2.247 3.709c7.746-2.44 13.861-5.67 18.347-9.689Zm-9.047-19.82h16.991c-1.86 5.668-4.528 10.402-8 14.204a42.526 42.526 0 0 1-4.247-4.922c-2.126-2.883-3.71-5.977-4.744-9.283Z"/></svg>
|
|
||||||
@@ -96,10 +96,6 @@ Plugins/PluginWillRequireReload: (requires reload)
|
|||||||
Plugins/Plugins/Caption: Plugins
|
Plugins/Plugins/Caption: Plugins
|
||||||
Plugins/Plugins/Hint: Plugins
|
Plugins/Plugins/Hint: Plugins
|
||||||
Plugins/Reinstall/Caption: reinstall
|
Plugins/Reinstall/Caption: reinstall
|
||||||
Plugins/Stability/Deprecated: DEPRECATED
|
|
||||||
Plugins/Stability/Experimental: EXPERIMENTAL
|
|
||||||
Plugins/Stability/Legacy: LEGACY
|
|
||||||
Plugins/Stability/Stable: STABLE
|
|
||||||
Plugins/Themes/Caption: Themes
|
Plugins/Themes/Caption: Themes
|
||||||
Plugins/Themes/Hint: Theme plugins
|
Plugins/Themes/Hint: Theme plugins
|
||||||
Plugins/Update/Caption: update
|
Plugins/Update/Caption: update
|
||||||
@@ -175,8 +171,6 @@ Settings/NavigationPermalinkviewMode/UpdateAddressBar/Description: Update addres
|
|||||||
Settings/PerformanceInstrumentation/Caption: Performance Instrumentation
|
Settings/PerformanceInstrumentation/Caption: Performance Instrumentation
|
||||||
Settings/PerformanceInstrumentation/Hint: Displays performance statistics in the browser developer console. Requires reload to take effect
|
Settings/PerformanceInstrumentation/Hint: Displays performance statistics in the browser developer console. Requires reload to take effect
|
||||||
Settings/PerformanceInstrumentation/Description: Enable performance instrumentation
|
Settings/PerformanceInstrumentation/Description: Enable performance instrumentation
|
||||||
Settings/RecentLimit/Caption: Recent Tab Limit
|
|
||||||
Settings/RecentLimit/Hint: Maximum number of tiddlers to be displayed under the sidebar "Recent" tab
|
|
||||||
Settings/ToolbarButtonStyle/Caption: Toolbar Button Style
|
Settings/ToolbarButtonStyle/Caption: Toolbar Button Style
|
||||||
Settings/ToolbarButtonStyle/Hint: Choose the style for toolbar buttons:
|
Settings/ToolbarButtonStyle/Hint: Choose the style for toolbar buttons:
|
||||||
Settings/ToolbarButtonStyle/Styles/Borderless: Borderless
|
Settings/ToolbarButtonStyle/Styles/Borderless: Borderless
|
||||||
@@ -206,10 +200,10 @@ Settings/MissingLinks/Hint: Choose whether to link to tiddlers that do not exist
|
|||||||
Settings/MissingLinks/Description: Enable links to missing tiddlers
|
Settings/MissingLinks/Description: Enable links to missing tiddlers
|
||||||
SocialCard/Caption: Social Media Card
|
SocialCard/Caption: Social Media Card
|
||||||
SocialCard/Domain/Prompt: Domain name to display for the link (for example, ''tiddlywiki.com'')
|
SocialCard/Domain/Prompt: Domain name to display for the link (for example, ''tiddlywiki.com'')
|
||||||
SocialCard/Hint: This information is used by social and messaging services to display a preview card for links to this ~TiddlyWiki when hosted online
|
SocialCard/Hint: This information is used by social and messaging services to display a preview card for links to this TiddlyWiki when hosted online
|
||||||
SocialCard/PreviewUrl/Prompt: Full URL to preview image for this ~TiddlyWiki
|
SocialCard/PreviewUrl/Prompt: Full URL to preview image for this TiddlyWiki
|
||||||
SocialCard/PreviewUrl/Preview: Preview image:
|
SocialCard/PreviewUrl/Preview: Preview image:
|
||||||
SocialCard/Url/Prompt: Full URL of this ~TiddlyWiki
|
SocialCard/Url/Prompt: Full URL of this TiddlyWiki
|
||||||
StoryTiddler/Caption: Story Tiddler
|
StoryTiddler/Caption: Story Tiddler
|
||||||
StoryTiddler/Hint: This rule cascade is used to dynamically choose the template for displaying a tiddler in the story river.
|
StoryTiddler/Hint: This rule cascade is used to dynamically choose the template for displaying a tiddler in the story river.
|
||||||
StoryView/Caption: Story View
|
StoryView/Caption: Story View
|
||||||
|
|||||||
@@ -26,8 +26,6 @@ Tags/ClearInput/Caption: clear input
|
|||||||
Tags/ClearInput/Hint: Clear tag input
|
Tags/ClearInput/Hint: Clear tag input
|
||||||
Tags/Dropdown/Caption: tag list
|
Tags/Dropdown/Caption: tag list
|
||||||
Tags/Dropdown/Hint: Show tag list
|
Tags/Dropdown/Hint: Show tag list
|
||||||
Tags/EmptyMessage: No tags found
|
|
||||||
Tags/EmptyMessage/System: No system tags found
|
|
||||||
Title/BadCharacterWarning: Warning: avoid using any of the characters <<bad-chars>> in tiddler titles
|
Title/BadCharacterWarning: Warning: avoid using any of the characters <<bad-chars>> in tiddler titles
|
||||||
Title/Exists/Prompt: Target tiddler already exists
|
Title/Exists/Prompt: Target tiddler already exists
|
||||||
Title/Relink/Prompt: Update ''<$text text=<<fromTitle>>/>'' to ''<$text text=<<toTitle>>/>'' in the //tags// and //list// fields of other tiddlers
|
Title/Relink/Prompt: Update ''<$text text=<<fromTitle>>/>'' to ''<$text text=<<toTitle>>/>'' in the //tags// and //list// fields of other tiddlers
|
||||||
|
|||||||
@@ -1,8 +0,0 @@
|
|||||||
title: $:/language/Help/echo
|
|
||||||
description: Displays all the passed arguments
|
|
||||||
|
|
||||||
Displays all the passed arguments to a command. Useful for debugging.
|
|
||||||
|
|
||||||
```
|
|
||||||
--echo <text> *
|
|
||||||
```
|
|
||||||
@@ -6,8 +6,6 @@ Filter/Hint: Search via a [[filter expression|https://tiddlywiki.com/static/Filt
|
|||||||
Filter/Matches: //<small><<resultCount>> matches</small>//
|
Filter/Matches: //<small><<resultCount>> matches</small>//
|
||||||
Matches: //<small><<resultCount>> matches</small>//
|
Matches: //<small><<resultCount>> matches</small>//
|
||||||
Matches/All: All matches:
|
Matches/All: All matches:
|
||||||
Matches/NoMatch: //No match//
|
|
||||||
Matches/NoResult: //No search result//
|
|
||||||
Matches/Title: Title matches:
|
Matches/Title: Title matches:
|
||||||
Search: Search
|
Search: Search
|
||||||
Search/TooShort: Search text too short
|
Search/TooShort: Search text too short
|
||||||
|
|||||||
13
core/language/en-GB/icon.tid
Normal file
13
core/language/en-GB/icon.tid
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
title: $:/languages/en-GB/icon
|
||||||
|
type: image/svg+xml
|
||||||
|
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 60 30" width="1200" height="600">
|
||||||
|
<clipPath id="t">
|
||||||
|
<path d="M30,15 h30 v15 z v15 h-30 z h-30 v-15 z v-15 h30 z"/>
|
||||||
|
</clipPath>
|
||||||
|
<path d="M0,0 v30 h60 v-30 z" fill="#00247d"/>
|
||||||
|
<path d="M0,0 L60,30 M60,0 L0,30" stroke="#fff" stroke-width="6"/>
|
||||||
|
<path d="M0,0 L60,30 M60,0 L0,30" clip-path="url(#t)" stroke="#cf142b" stroke-width="4"/>
|
||||||
|
<path d="M30,0 v30 M0,15 h60" stroke="#fff" stroke-width="10"/>
|
||||||
|
<path d="M30,0 v30 M0,15 h60" stroke="#cf142b" stroke-width="6"/>
|
||||||
|
</svg>
|
||||||
@@ -6,14 +6,17 @@ module-type: global
|
|||||||
The $tw.Commander class is a command interpreter
|
The $tw.Commander class is a command interpreter
|
||||||
|
|
||||||
\*/
|
\*/
|
||||||
|
(function(){
|
||||||
|
|
||||||
|
/*jslint node: true, browser: true */
|
||||||
|
/*global $tw: false */
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Parse a sequence of commands
|
Parse a sequence of commands
|
||||||
commandTokens: an array of command string tokens
|
commandTokens: an array of command string tokens
|
||||||
wiki: reference to the wiki store object
|
wiki: reference to the wiki store object
|
||||||
streams: {output:, input:, error:}
|
streams: {output:, error:}, each of which has a write(string) method
|
||||||
callback: a callback invoked as callback(err) where err is null if there was no error
|
callback: a callback invoked as callback(err) where err is null if there was no error
|
||||||
*/
|
*/
|
||||||
var Commander = function(commandTokens,callback,wiki,streams) {
|
var Commander = function(commandTokens,callback,wiki,streams) {
|
||||||
@@ -61,172 +64,69 @@ Commander.prototype.execute = function() {
|
|||||||
this.executeNextCommand();
|
this.executeNextCommand();
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
|
||||||
Returns the next string token without consuming it, or null if there are none left. Callback invoked(err,data)
|
|
||||||
*/
|
|
||||||
Commander.prototype.peekNextToken = function(callback) {
|
|
||||||
var self = this;
|
|
||||||
if(this.nextToken >= this.commandTokens.length) {
|
|
||||||
return callback(null,null);
|
|
||||||
} else {
|
|
||||||
return this.stringifyToken(this.nextToken,function(err,data) {
|
|
||||||
if(!err) {
|
|
||||||
// Save the stringified token for next time so that we don't run prompts twice
|
|
||||||
self.commandTokens[self.nextToken] = data;
|
|
||||||
}
|
|
||||||
callback(err,data);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
/*
|
|
||||||
Returns and consumes the next string token, or null if there are none left. Callback invoked(err,data)
|
|
||||||
*/
|
|
||||||
Commander.prototype.getNextToken = function(callback) {
|
|
||||||
if(this.nextToken >= this.commandTokens.length) {
|
|
||||||
return callback(null,null);
|
|
||||||
} else {
|
|
||||||
return this.stringifyToken(this.nextToken++,callback);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
/*
|
|
||||||
Returns and consumes the string tokens until the end of the token stream or the first token that starts with "--".
|
|
||||||
Callback invoked(err,tokenArray)
|
|
||||||
*/
|
|
||||||
Commander.prototype.getTokensUntilCommand = function(callback) {
|
|
||||||
var self = this,
|
|
||||||
tokens = [];
|
|
||||||
function processNextToken() {
|
|
||||||
self.peekNextToken(function(err,data) {
|
|
||||||
if(err) {
|
|
||||||
return callback(err);
|
|
||||||
}
|
|
||||||
if(data === null || data.substr(0,2) === "--") {
|
|
||||||
return callback(null,tokens);
|
|
||||||
} else {
|
|
||||||
self.getNextToken(function(err,data) {
|
|
||||||
if(err) {
|
|
||||||
return callback(err);
|
|
||||||
}
|
|
||||||
tokens.push(data);
|
|
||||||
processNextToken();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
processNextToken();
|
|
||||||
};
|
|
||||||
|
|
||||||
/*
|
|
||||||
Returns a specified stringified token, or null if the index does not exist. Callback invoked(err,data)
|
|
||||||
*/
|
|
||||||
Commander.prototype.stringifyToken = function(index,callback) {
|
|
||||||
var self = this;
|
|
||||||
if(index >= this.commandTokens.length) {
|
|
||||||
return callback(null,null);
|
|
||||||
} else {
|
|
||||||
var token = this.commandTokens[index];
|
|
||||||
if(typeof token === "string") {
|
|
||||||
return callback(null,token);
|
|
||||||
} else if(typeof token === "object") {
|
|
||||||
switch(token.type) {
|
|
||||||
case "filter":
|
|
||||||
return callback(null,this.wiki.filterTiddlers(token.text)[0] || "");
|
|
||||||
case "wikify":
|
|
||||||
return callback(null,this.wiki.renderText("text/plain","text/vnd.tiddlywiki",token.text,{
|
|
||||||
parseAsInline: false,
|
|
||||||
parentWidget: $tw.rootWidget
|
|
||||||
}));
|
|
||||||
case "prompt":
|
|
||||||
$tw.utils.terminalQuestion({
|
|
||||||
promptText: token.prompt || "Please enter a value",
|
|
||||||
defaultResult: token["default"] || "",
|
|
||||||
callback: function(err,userText) {
|
|
||||||
if(err) {
|
|
||||||
callback(err);
|
|
||||||
} else {
|
|
||||||
if(token.transformFilter) {
|
|
||||||
userText = self.wiki.filterTiddlers(token.transformFilter,null,self.wiki.makeTiddlerIterator([userText]))[0] || "";
|
|
||||||
}
|
|
||||||
callback(null,userText);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
input: self.streams.input,
|
|
||||||
output: self.streams.output,
|
|
||||||
});
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
throw "Unknown dynamic command token type: " + token.type;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Execute the next command in the sequence
|
Execute the next command in the sequence
|
||||||
*/
|
*/
|
||||||
Commander.prototype.executeNextCommand = function() {
|
Commander.prototype.executeNextCommand = function() {
|
||||||
var self = this;
|
var self = this;
|
||||||
// Get and check the command token
|
// Invoke the callback if there are no more commands
|
||||||
var commandName = this.getNextToken(function(err,commandName) {
|
if(this.nextToken >= this.commandTokens.length) {
|
||||||
if(err) {
|
this.callback(null);
|
||||||
return self.callback(err);
|
} else {
|
||||||
}
|
// Get and check the command token
|
||||||
if(!commandName) {
|
var commandName = this.commandTokens[this.nextToken++];
|
||||||
return self.callback(null);
|
|
||||||
}
|
|
||||||
if(commandName.substr(0,2) !== "--") {
|
if(commandName.substr(0,2) !== "--") {
|
||||||
return self.callback("Missing command: " + commandName);
|
this.callback("Missing command: " + commandName);
|
||||||
} else {
|
} else {
|
||||||
commandName = commandName.substr(2); // Trim off the --
|
commandName = commandName.substr(2); // Trim off the --
|
||||||
// Get the parameters to the command
|
// Accumulate the parameters to the command
|
||||||
self.getTokensUntilCommand(function(err,params) {
|
var params = [];
|
||||||
if(err) {
|
while(this.nextToken < this.commandTokens.length &&
|
||||||
return self.callback(err);
|
this.commandTokens[this.nextToken].substr(0,2) !== "--") {
|
||||||
|
params.push(this.commandTokens[this.nextToken++]);
|
||||||
|
}
|
||||||
|
// Get the command info
|
||||||
|
var command = $tw.commands[commandName],
|
||||||
|
c,err;
|
||||||
|
if(!command) {
|
||||||
|
this.callback("Unknown command: " + commandName);
|
||||||
|
} else {
|
||||||
|
if(this.verbose) {
|
||||||
|
this.streams.output.write("Executing command: " + commandName + " " + params.join(" ") + "\n");
|
||||||
}
|
}
|
||||||
var command = $tw.commands[commandName],
|
// Parse named parameters if required
|
||||||
c,err;
|
if(command.info.namedParameterMode) {
|
||||||
if(!command) {
|
params = this.extractNamedParameters(params,command.info.mandatoryParameters);
|
||||||
self.callback("Unknown command: " + commandName);
|
if(typeof params === "string") {
|
||||||
|
return this.callback(params);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(command.info.synchronous) {
|
||||||
|
// Synchronous command
|
||||||
|
c = new command.Command(params,this);
|
||||||
|
err = c.execute();
|
||||||
|
if(err) {
|
||||||
|
this.callback(err);
|
||||||
|
} else {
|
||||||
|
this.executeNextCommand();
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
if(self.verbose) {
|
// Asynchronous command
|
||||||
self.streams.output.write("Executing command: " + commandName + " " + params.join(" ") + "\n");
|
c = new command.Command(params,this,function(err) {
|
||||||
}
|
|
||||||
// Parse named parameters if required
|
|
||||||
if(command.info.namedParameterMode) {
|
|
||||||
params = self.extractNamedParameters(params,command.info.mandatoryParameters);
|
|
||||||
if(typeof params === "string") {
|
|
||||||
return self.callback(params);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if(command.info.synchronous) {
|
|
||||||
// Synchronous command
|
|
||||||
c = new command.Command(params,self);
|
|
||||||
err = c.execute();
|
|
||||||
if(err) {
|
if(err) {
|
||||||
self.callback(err);
|
self.callback(err);
|
||||||
} else {
|
} else {
|
||||||
self.executeNextCommand();
|
self.executeNextCommand();
|
||||||
}
|
}
|
||||||
} else {
|
});
|
||||||
// Asynchronous command
|
err = c.execute();
|
||||||
c = new command.Command(params,self,function(err) {
|
if(err) {
|
||||||
if(err) {
|
this.callback(err);
|
||||||
self.callback(err);
|
|
||||||
} else {
|
|
||||||
self.executeNextCommand();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
err = c.execute();
|
|
||||||
if(err) {
|
|
||||||
self.callback(err);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
}
|
||||||
}
|
}
|
||||||
});
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -273,3 +173,5 @@ Commander.initCommands = function(moduleType) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
exports.Commander = Commander;
|
exports.Commander = Commander;
|
||||||
|
|
||||||
|
})();
|
||||||
|
|||||||
@@ -6,7 +6,10 @@ module-type: command
|
|||||||
Command to build a build target
|
Command to build a build target
|
||||||
|
|
||||||
\*/
|
\*/
|
||||||
|
(function(){
|
||||||
|
|
||||||
|
/*jslint node: true, browser: true */
|
||||||
|
/*global $tw: false */
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
exports.info = {
|
exports.info = {
|
||||||
@@ -21,7 +24,7 @@ var Command = function(params,commander) {
|
|||||||
|
|
||||||
Command.prototype.execute = function() {
|
Command.prototype.execute = function() {
|
||||||
// Get the build targets defined in the wiki
|
// Get the build targets defined in the wiki
|
||||||
var buildTargets = $tw.boot.wikiInfo && $tw.boot.wikiInfo.build;
|
var buildTargets = $tw.boot.wikiInfo.build;
|
||||||
if(!buildTargets) {
|
if(!buildTargets) {
|
||||||
return "No build targets defined";
|
return "No build targets defined";
|
||||||
}
|
}
|
||||||
@@ -45,3 +48,5 @@ Command.prototype.execute = function() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
exports.Command = Command;
|
exports.Command = Command;
|
||||||
|
|
||||||
|
})();
|
||||||
|
|||||||
@@ -6,7 +6,10 @@ module-type: command
|
|||||||
Clear password for crypto operations
|
Clear password for crypto operations
|
||||||
|
|
||||||
\*/
|
\*/
|
||||||
|
(function(){
|
||||||
|
|
||||||
|
/*jslint node: true, browser: true */
|
||||||
|
/*global $tw: false */
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
exports.info = {
|
exports.info = {
|
||||||
@@ -26,3 +29,5 @@ Command.prototype.execute = function() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
exports.Command = Command;
|
exports.Command = Command;
|
||||||
|
|
||||||
|
})();
|
||||||
|
|||||||
@@ -7,6 +7,10 @@ Runs the commands returned from a filter
|
|||||||
|
|
||||||
\*/
|
\*/
|
||||||
|
|
||||||
|
(function() {
|
||||||
|
|
||||||
|
/*jslint node: true, browser: true */
|
||||||
|
/*global $tw: false */
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
exports.info = {
|
exports.info = {
|
||||||
@@ -34,3 +38,5 @@ Command.prototype.execute = function() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
exports.Command = Command;
|
exports.Command = Command;
|
||||||
|
|
||||||
|
})();
|
||||||
|
|||||||
@@ -6,7 +6,10 @@ module-type: command
|
|||||||
Command to delete tiddlers
|
Command to delete tiddlers
|
||||||
|
|
||||||
\*/
|
\*/
|
||||||
|
(function(){
|
||||||
|
|
||||||
|
/*jslint node: true, browser: true */
|
||||||
|
/*global $tw: false */
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
exports.info = {
|
exports.info = {
|
||||||
@@ -35,3 +38,5 @@ Command.prototype.execute = function() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
exports.Command = Command;
|
exports.Command = Command;
|
||||||
|
|
||||||
|
})();
|
||||||
|
|||||||
@@ -1,32 +0,0 @@
|
|||||||
/*\
|
|
||||||
title: $:/core/modules/commands/echo.js
|
|
||||||
type: application/javascript
|
|
||||||
module-type: command
|
|
||||||
|
|
||||||
Command to echo input parameters
|
|
||||||
|
|
||||||
\*/
|
|
||||||
(function(){
|
|
||||||
|
|
||||||
/*jslint node: true, browser: true */
|
|
||||||
/*global $tw: false */
|
|
||||||
"use strict";
|
|
||||||
|
|
||||||
exports.info = {
|
|
||||||
name: "echo",
|
|
||||||
synchronous: true
|
|
||||||
};
|
|
||||||
|
|
||||||
var Command = function(params,commander) {
|
|
||||||
this.params = params;
|
|
||||||
this.commander = commander;
|
|
||||||
};
|
|
||||||
|
|
||||||
Command.prototype.execute = function() {
|
|
||||||
this.commander.streams.output.write(JSON.stringify(this.params,null,4) + "\n");
|
|
||||||
return null;
|
|
||||||
};
|
|
||||||
|
|
||||||
exports.Command = Command;
|
|
||||||
|
|
||||||
})();
|
|
||||||
@@ -6,7 +6,10 @@ module-type: command
|
|||||||
Command to list the available editions
|
Command to list the available editions
|
||||||
|
|
||||||
\*/
|
\*/
|
||||||
|
(function(){
|
||||||
|
|
||||||
|
/*jslint node: true, browser: true */
|
||||||
|
/*global $tw: false */
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
exports.info = {
|
exports.info = {
|
||||||
@@ -32,3 +35,5 @@ Command.prototype.execute = function() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
exports.Command = Command;
|
exports.Command = Command;
|
||||||
|
|
||||||
|
})();
|
||||||
|
|||||||
@@ -6,7 +6,10 @@ module-type: command
|
|||||||
Commands to fetch external tiddlers
|
Commands to fetch external tiddlers
|
||||||
|
|
||||||
\*/
|
\*/
|
||||||
|
(function(){
|
||||||
|
|
||||||
|
/*jslint node: true, browser: true */
|
||||||
|
/*global $tw: false */
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
exports.info = {
|
exports.info = {
|
||||||
@@ -168,3 +171,5 @@ Command.prototype.processBody = function(body,type,options,url) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
exports.Command = Command;
|
exports.Command = Command;
|
||||||
|
|
||||||
|
})();
|
||||||
|
|||||||
@@ -6,7 +6,10 @@ module-type: command
|
|||||||
Help command
|
Help command
|
||||||
|
|
||||||
\*/
|
\*/
|
||||||
|
(function(){
|
||||||
|
|
||||||
|
/*jshint node: true, browser: true */
|
||||||
|
/*global $tw: false */
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
exports.info = {
|
exports.info = {
|
||||||
@@ -34,3 +37,5 @@ Command.prototype.execute = function() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
exports.Command = Command;
|
exports.Command = Command;
|
||||||
|
|
||||||
|
})();
|
||||||
|
|||||||
@@ -6,7 +6,10 @@ module-type: command
|
|||||||
Command to import tiddlers from a file
|
Command to import tiddlers from a file
|
||||||
|
|
||||||
\*/
|
\*/
|
||||||
|
(function(){
|
||||||
|
|
||||||
|
/*jslint node: true, browser: true */
|
||||||
|
/*global $tw: false */
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
exports.info = {
|
exports.info = {
|
||||||
@@ -41,3 +44,5 @@ Command.prototype.execute = function() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
exports.Command = Command;
|
exports.Command = Command;
|
||||||
|
|
||||||
|
})();
|
||||||
|
|||||||
@@ -6,7 +6,10 @@ module-type: command
|
|||||||
Command to initialise an empty wiki folder
|
Command to initialise an empty wiki folder
|
||||||
|
|
||||||
\*/
|
\*/
|
||||||
|
(function(){
|
||||||
|
|
||||||
|
/*jslint node: true, browser: true */
|
||||||
|
/*global $tw: false */
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
exports.info = {
|
exports.info = {
|
||||||
@@ -52,3 +55,5 @@ Command.prototype.execute = function() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
exports.Command = Command;
|
exports.Command = Command;
|
||||||
|
|
||||||
|
})();
|
||||||
|
|||||||
@@ -6,7 +6,10 @@ module-type: command
|
|||||||
Listen for HTTP requests and serve tiddlers
|
Listen for HTTP requests and serve tiddlers
|
||||||
|
|
||||||
\*/
|
\*/
|
||||||
|
(function(){
|
||||||
|
|
||||||
|
/*jslint node: true, browser: true */
|
||||||
|
/*global $tw: false */
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
var Server = require("$:/core/modules/server/server.js").Server;
|
var Server = require("$:/core/modules/server/server.js").Server;
|
||||||
@@ -41,3 +44,5 @@ Command.prototype.execute = function() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
exports.Command = Command;
|
exports.Command = Command;
|
||||||
|
|
||||||
|
})();
|
||||||
|
|||||||
@@ -6,7 +6,10 @@ module-type: command
|
|||||||
Command to load tiddlers from a file or directory
|
Command to load tiddlers from a file or directory
|
||||||
|
|
||||||
\*/
|
\*/
|
||||||
|
(function(){
|
||||||
|
|
||||||
|
/*jslint node: true, browser: true */
|
||||||
|
/*global $tw: false */
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
exports.info = {
|
exports.info = {
|
||||||
@@ -44,3 +47,5 @@ Command.prototype.execute = function() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
exports.Command = Command;
|
exports.Command = Command;
|
||||||
|
|
||||||
|
})();
|
||||||
|
|||||||
@@ -6,7 +6,10 @@ module-type: command
|
|||||||
Command to pack all of the plugins in the library into a plugin tiddler of type "library"
|
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";
|
"use strict";
|
||||||
|
|
||||||
exports.info = {
|
exports.info = {
|
||||||
@@ -38,3 +41,5 @@ Command.prototype.execute = function() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
exports.Command = Command;
|
exports.Command = Command;
|
||||||
|
|
||||||
|
})();
|
||||||
|
|||||||
@@ -6,7 +6,10 @@ module-type: command
|
|||||||
Command to set the default output location (defaults to current working directory)
|
Command to set the default output location (defaults to current working directory)
|
||||||
|
|
||||||
\*/
|
\*/
|
||||||
|
(function(){
|
||||||
|
|
||||||
|
/*jslint node: true, browser: true */
|
||||||
|
/*global $tw: false */
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
exports.info = {
|
exports.info = {
|
||||||
@@ -31,3 +34,5 @@ Command.prototype.execute = function() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
exports.Command = Command;
|
exports.Command = Command;
|
||||||
|
|
||||||
|
})();
|
||||||
|
|||||||
@@ -6,7 +6,10 @@ module-type: command
|
|||||||
Save password for crypto operations
|
Save password for crypto operations
|
||||||
|
|
||||||
\*/
|
\*/
|
||||||
|
(function(){
|
||||||
|
|
||||||
|
/*jslint node: true, browser: true */
|
||||||
|
/*global $tw: false */
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
exports.info = {
|
exports.info = {
|
||||||
@@ -29,3 +32,5 @@ Command.prototype.execute = function() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
exports.Command = Command;
|
exports.Command = Command;
|
||||||
|
|
||||||
|
})();
|
||||||
|
|||||||
@@ -6,7 +6,10 @@ module-type: command
|
|||||||
Render individual tiddlers and save the results to the specified files
|
Render individual tiddlers and save the results to the specified files
|
||||||
|
|
||||||
\*/
|
\*/
|
||||||
|
(function(){
|
||||||
|
|
||||||
|
/*jslint node: true, browser: true */
|
||||||
|
/*global $tw: false */
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
var widget = require("$:/core/modules/widgets/widget.js");
|
var widget = require("$:/core/modules/widgets/widget.js");
|
||||||
@@ -63,3 +66,6 @@ Render individual tiddlers and save the results to the specified files
|
|||||||
};
|
};
|
||||||
|
|
||||||
exports.Command = Command;
|
exports.Command = Command;
|
||||||
|
|
||||||
|
})();
|
||||||
|
|
||||||
@@ -6,7 +6,10 @@ module-type: command
|
|||||||
Command to render a tiddler and save it to a file
|
Command to render a tiddler and save it to a file
|
||||||
|
|
||||||
\*/
|
\*/
|
||||||
|
(function(){
|
||||||
|
|
||||||
|
/*jslint node: true, browser: true */
|
||||||
|
/*global $tw: false */
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
exports.info = {
|
exports.info = {
|
||||||
@@ -50,3 +53,5 @@ Command.prototype.execute = function() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
exports.Command = Command;
|
exports.Command = Command;
|
||||||
|
|
||||||
|
})();
|
||||||
|
|||||||
@@ -6,7 +6,10 @@ module-type: command
|
|||||||
Command to render several tiddlers to a folder of files
|
Command to render several tiddlers to a folder of files
|
||||||
|
|
||||||
\*/
|
\*/
|
||||||
|
(function(){
|
||||||
|
|
||||||
|
/*jslint node: true, browser: true */
|
||||||
|
/*global $tw: false */
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
var widget = require("$:/core/modules/widgets/widget.js");
|
var widget = require("$:/core/modules/widgets/widget.js");
|
||||||
@@ -62,3 +65,5 @@ Command.prototype.execute = function() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
exports.Command = Command;
|
exports.Command = Command;
|
||||||
|
|
||||||
|
})();
|
||||||
|
|||||||
@@ -6,7 +6,10 @@ module-type: command
|
|||||||
Saves individual tiddlers in their raw text or binary format to the specified files
|
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";
|
"use strict";
|
||||||
|
|
||||||
exports.info = {
|
exports.info = {
|
||||||
@@ -61,3 +64,6 @@ Saves individual tiddlers in their raw text or binary format to the specified fi
|
|||||||
};
|
};
|
||||||
|
|
||||||
exports.Command = Command;
|
exports.Command = Command;
|
||||||
|
|
||||||
|
})();
|
||||||
|
|
||||||
@@ -16,7 +16,10 @@ 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.
|
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";
|
"use strict";
|
||||||
|
|
||||||
exports.info = {
|
exports.info = {
|
||||||
@@ -91,3 +94,5 @@ Command.prototype.execute = function() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
exports.Command = Command;
|
exports.Command = Command;
|
||||||
|
|
||||||
|
})();
|
||||||
|
|||||||
@@ -6,7 +6,10 @@ module-type: command
|
|||||||
Command to save the content of a tiddler to a file
|
Command to save the content of a tiddler to a file
|
||||||
|
|
||||||
\*/
|
\*/
|
||||||
|
(function(){
|
||||||
|
|
||||||
|
/*jslint node: true, browser: true */
|
||||||
|
/*global $tw: false */
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
exports.info = {
|
exports.info = {
|
||||||
@@ -44,3 +47,5 @@ Command.prototype.execute = function() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
exports.Command = Command;
|
exports.Command = Command;
|
||||||
|
|
||||||
|
})();
|
||||||
|
|||||||
@@ -6,7 +6,10 @@ module-type: command
|
|||||||
Command to save several tiddlers to a folder of files
|
Command to save several tiddlers to a folder of files
|
||||||
|
|
||||||
\*/
|
\*/
|
||||||
|
(function(){
|
||||||
|
|
||||||
|
/*jslint node: true, browser: true */
|
||||||
|
/*global $tw: false */
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
var widget = require("$:/core/modules/widgets/widget.js");
|
var widget = require("$:/core/modules/widgets/widget.js");
|
||||||
@@ -49,3 +52,5 @@ Command.prototype.execute = function() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
exports.Command = Command;
|
exports.Command = Command;
|
||||||
|
|
||||||
|
})();
|
||||||
|
|||||||
@@ -15,7 +15,10 @@ The following options are supported:
|
|||||||
Supports backward compatibility with --savewikifolder <wikifolderpath> [<filter>] [ [<name>=<value>] ]*
|
Supports backward compatibility with --savewikifolder <wikifolderpath> [<filter>] [ [<name>=<value>] ]*
|
||||||
|
|
||||||
\*/
|
\*/
|
||||||
|
(function(){
|
||||||
|
|
||||||
|
/*jslint node: true, browser: true */
|
||||||
|
/*global $tw: false */
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
exports.info = {
|
exports.info = {
|
||||||
@@ -218,3 +221,5 @@ WikiFolderMaker.prototype.saveFile = function(filename,encoding,data) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
exports.Command = Command;
|
exports.Command = Command;
|
||||||
|
|
||||||
|
})();
|
||||||
|
|||||||
@@ -6,7 +6,10 @@ module-type: command
|
|||||||
Deprecated legacy command for serving tiddlers
|
Deprecated legacy command for serving tiddlers
|
||||||
|
|
||||||
\*/
|
\*/
|
||||||
|
(function(){
|
||||||
|
|
||||||
|
/*jslint node: true, browser: true */
|
||||||
|
/*global $tw: false */
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
var Server = require("$:/core/modules/server/server.js").Server;
|
var Server = require("$:/core/modules/server/server.js").Server;
|
||||||
@@ -48,3 +51,5 @@ Command.prototype.execute = function() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
exports.Command = Command;
|
exports.Command = Command;
|
||||||
|
|
||||||
|
})();
|
||||||
|
|||||||
@@ -6,7 +6,10 @@ 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.
|
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";
|
"use strict";
|
||||||
|
|
||||||
var widget = require("$:/core/modules/widgets/widget.js");
|
var widget = require("$:/core/modules/widgets/widget.js");
|
||||||
@@ -51,3 +54,5 @@ Command.prototype.execute = function() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
exports.Command = Command;
|
exports.Command = Command;
|
||||||
|
|
||||||
|
})();
|
||||||
|
|||||||
@@ -6,7 +6,10 @@ module-type: command
|
|||||||
Command to extract the shadow tiddlers from within a plugin
|
Command to extract the shadow tiddlers from within a plugin
|
||||||
|
|
||||||
\*/
|
\*/
|
||||||
|
(function(){
|
||||||
|
|
||||||
|
/*jslint node: true, browser: true */
|
||||||
|
/*global $tw: false */
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
exports.info = {
|
exports.info = {
|
||||||
@@ -37,3 +40,5 @@ Command.prototype.execute = function() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
exports.Command = Command;
|
exports.Command = Command;
|
||||||
|
|
||||||
|
})();
|
||||||
|
|||||||
@@ -6,7 +6,10 @@ module-type: command
|
|||||||
Verbose command
|
Verbose command
|
||||||
|
|
||||||
\*/
|
\*/
|
||||||
|
(function(){
|
||||||
|
|
||||||
|
/*jslint node: true, browser: true */
|
||||||
|
/*global $tw: false */
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
exports.info = {
|
exports.info = {
|
||||||
@@ -27,3 +30,5 @@ Command.prototype.execute = function() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
exports.Command = Command;
|
exports.Command = Command;
|
||||||
|
|
||||||
|
})();
|
||||||
|
|||||||
@@ -6,7 +6,10 @@ module-type: command
|
|||||||
Version command
|
Version command
|
||||||
|
|
||||||
\*/
|
\*/
|
||||||
|
(function(){
|
||||||
|
|
||||||
|
/*jslint node: true, browser: true */
|
||||||
|
/*global $tw: false */
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
exports.info = {
|
exports.info = {
|
||||||
@@ -25,3 +28,5 @@ Command.prototype.execute = function() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
exports.Command = Command;
|
exports.Command = Command;
|
||||||
|
|
||||||
|
})();
|
||||||
|
|||||||
@@ -6,7 +6,10 @@ module-type: config
|
|||||||
Core configuration constants
|
Core configuration constants
|
||||||
|
|
||||||
\*/
|
\*/
|
||||||
|
(function(){
|
||||||
|
|
||||||
|
/*jslint node: true, browser: true */
|
||||||
|
/*global $tw: false */
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
exports.preferences = {};
|
exports.preferences = {};
|
||||||
@@ -34,3 +37,5 @@ 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.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(",");
|
exports.htmlUnsafeElements = "script".split(",");
|
||||||
|
|
||||||
|
})();
|
||||||
|
|||||||
@@ -6,7 +6,10 @@ module-type: tiddlerdeserializer
|
|||||||
Functions to deserialise tiddlers from a block of text
|
Functions to deserialise tiddlers from a block of text
|
||||||
|
|
||||||
\*/
|
\*/
|
||||||
|
(function(){
|
||||||
|
|
||||||
|
/*jslint node: true, browser: true */
|
||||||
|
/*global $tw: false */
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
exports["application/x-tiddler-html-div"] = function(text,fields) {
|
exports["application/x-tiddler-html-div"] = function(text,fields) {
|
||||||
@@ -178,3 +181,5 @@ var deserializeTiddlerDiv = function(text /* [,fields] */) {
|
|||||||
}
|
}
|
||||||
return undefined;
|
return undefined;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
})();
|
||||||
|
|||||||
@@ -6,7 +6,10 @@ 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
|
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";
|
"use strict";
|
||||||
|
|
||||||
var HEIGHT_VALUE_TITLE = "$:/config/TextEditor/EditorHeight/Height";
|
var HEIGHT_VALUE_TITLE = "$:/config/TextEditor/EditorHeight/Height";
|
||||||
@@ -270,3 +273,5 @@ FramedEngine.prototype.executeTextOperation = function(operation) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
exports.FramedEngine = FramedEngine;
|
exports.FramedEngine = FramedEngine;
|
||||||
|
|
||||||
|
})();
|
||||||
|
|||||||
@@ -6,7 +6,10 @@ module-type: library
|
|||||||
Text editor engine based on a simple input or textarea tag
|
Text editor engine based on a simple input or textarea tag
|
||||||
|
|
||||||
\*/
|
\*/
|
||||||
|
(function(){
|
||||||
|
|
||||||
|
/*jslint node: true, browser: true */
|
||||||
|
/*global $tw: false */
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
var HEIGHT_VALUE_TITLE = "$:/config/TextEditor/EditorHeight/Height";
|
var HEIGHT_VALUE_TITLE = "$:/config/TextEditor/EditorHeight/Height";
|
||||||
@@ -169,3 +172,5 @@ SimpleEngine.prototype.executeTextOperation = function(operation) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
exports.SimpleEngine = SimpleEngine;
|
exports.SimpleEngine = SimpleEngine;
|
||||||
|
|
||||||
|
})();
|
||||||
|
|||||||
@@ -6,7 +6,10 @@ module-type: library
|
|||||||
Factory for constructing text editor widgets with specified engines for the toolbar and non-toolbar cases
|
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";
|
"use strict";
|
||||||
|
|
||||||
var DEFAULT_MIN_TEXT_AREA_HEIGHT = "100px"; // Minimum height of textareas in pixels
|
var DEFAULT_MIN_TEXT_AREA_HEIGHT = "100px"; // Minimum height of textareas in pixels
|
||||||
@@ -383,3 +386,5 @@ function editTextWidgetFactory(toolbarEngine,nonToolbarEngine) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
exports.editTextWidgetFactory = editTextWidgetFactory;
|
exports.editTextWidgetFactory = editTextWidgetFactory;
|
||||||
|
|
||||||
|
})();
|
||||||
|
|||||||
@@ -6,7 +6,10 @@ module-type: bitmapeditoroperation
|
|||||||
Bitmap editor operation to clear the image
|
Bitmap editor operation to clear the image
|
||||||
|
|
||||||
\*/
|
\*/
|
||||||
|
(function(){
|
||||||
|
|
||||||
|
/*jslint node: true, browser: true */
|
||||||
|
/*global $tw: false */
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
exports["clear"] = function(event) {
|
exports["clear"] = function(event) {
|
||||||
@@ -17,3 +20,5 @@ exports["clear"] = function(event) {
|
|||||||
// Save changes
|
// Save changes
|
||||||
this.strokeEnd();
|
this.strokeEnd();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
})();
|
||||||
|
|||||||
@@ -6,7 +6,10 @@ module-type: bitmapeditoroperation
|
|||||||
Bitmap editor operation to resize the image
|
Bitmap editor operation to resize the image
|
||||||
|
|
||||||
\*/
|
\*/
|
||||||
|
(function(){
|
||||||
|
|
||||||
|
/*jslint node: true, browser: true */
|
||||||
|
/*global $tw: false */
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
exports["resize"] = function(event) {
|
exports["resize"] = function(event) {
|
||||||
@@ -22,3 +25,5 @@ exports["resize"] = function(event) {
|
|||||||
// Save the image into the tiddler
|
// Save the image into the tiddler
|
||||||
this.saveChanges();
|
this.saveChanges();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
})();
|
||||||
|
|||||||
@@ -6,7 +6,10 @@ module-type: bitmapeditoroperation
|
|||||||
Bitmap editor operation to rotate the image left by 90 degrees
|
Bitmap editor operation to rotate the image left by 90 degrees
|
||||||
|
|
||||||
\*/
|
\*/
|
||||||
|
(function(){
|
||||||
|
|
||||||
|
/*jslint node: true, browser: true */
|
||||||
|
/*global $tw: false */
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
exports["rotate-left"] = function(event) {
|
exports["rotate-left"] = function(event) {
|
||||||
@@ -17,3 +20,5 @@ exports["rotate-left"] = function(event) {
|
|||||||
// Save the image into the tiddler
|
// Save the image into the tiddler
|
||||||
this.saveChanges();
|
this.saveChanges();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
})();
|
||||||
|
|||||||
@@ -6,17 +6,15 @@ module-type: texteditoroperation
|
|||||||
Text editor operation to excise the selection to a new tiddler
|
Text editor operation to excise the selection to a new tiddler
|
||||||
|
|
||||||
\*/
|
\*/
|
||||||
|
(function(){
|
||||||
|
|
||||||
|
/*jslint node: true, browser: true */
|
||||||
|
/*global $tw: false */
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
function isMarkdown(mediaType) {
|
|
||||||
return mediaType === 'text/markdown' || mediaType === 'text/x-markdown';
|
|
||||||
}
|
|
||||||
|
|
||||||
exports["excise"] = function(event,operation) {
|
exports["excise"] = function(event,operation) {
|
||||||
var editTiddler = this.wiki.getTiddler(this.editTitle),
|
var editTiddler = this.wiki.getTiddler(this.editTitle),
|
||||||
editTiddlerTitle = this.editTitle,
|
editTiddlerTitle = this.editTitle,
|
||||||
wikiLinks = !isMarkdown(editTiddler.fields.type),
|
|
||||||
excisionBaseTitle = $tw.language.getString("Buttons/Excise/DefaultTitle");
|
excisionBaseTitle = $tw.language.getString("Buttons/Excise/DefaultTitle");
|
||||||
if(editTiddler && editTiddler.fields["draft.of"]) {
|
if(editTiddler && editTiddler.fields["draft.of"]) {
|
||||||
editTiddlerTitle = editTiddler.fields["draft.of"];
|
editTiddlerTitle = editTiddler.fields["draft.of"];
|
||||||
@@ -28,8 +26,7 @@ exports["excise"] = function(event,operation) {
|
|||||||
{
|
{
|
||||||
title: excisionTitle,
|
title: excisionTitle,
|
||||||
text: operation.selection,
|
text: operation.selection,
|
||||||
tags: event.paramObject.tagnew === "yes" ? [editTiddlerTitle] : [],
|
tags: event.paramObject.tagnew === "yes" ? [editTiddlerTitle] : []
|
||||||
type: editTiddler.fields.type
|
|
||||||
}
|
}
|
||||||
));
|
));
|
||||||
operation.replacement = excisionTitle;
|
operation.replacement = excisionTitle;
|
||||||
@@ -38,8 +35,7 @@ exports["excise"] = function(event,operation) {
|
|||||||
operation.replacement = "{{" + operation.replacement+ "}}";
|
operation.replacement = "{{" + operation.replacement+ "}}";
|
||||||
break;
|
break;
|
||||||
case "link":
|
case "link":
|
||||||
operation.replacement = wikiLinks ? "[[" + operation.replacement+ "]]"
|
operation.replacement = "[[" + operation.replacement+ "]]";
|
||||||
: ("[" + operation.replacement + "](<#" + operation.replacement + ">)");
|
|
||||||
break;
|
break;
|
||||||
case "macro":
|
case "macro":
|
||||||
operation.replacement = "<<" + (event.paramObject.macro || "translink") + " \"\"\"" + operation.replacement + "\"\"\">>";
|
operation.replacement = "<<" + (event.paramObject.macro || "translink") + " \"\"\"" + operation.replacement + "\"\"\">>";
|
||||||
@@ -50,3 +46,5 @@ exports["excise"] = function(event,operation) {
|
|||||||
operation.newSelStart = operation.selStart;
|
operation.newSelStart = operation.selStart;
|
||||||
operation.newSelEnd = operation.selStart + operation.replacement.length;
|
operation.newSelEnd = operation.selStart + operation.replacement.length;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
})();
|
||||||
|
|||||||
@@ -4,9 +4,14 @@ type: application/javascript
|
|||||||
module-type: texteditoroperation
|
module-type: texteditoroperation
|
||||||
Simply focus the Text editor
|
Simply focus the Text editor
|
||||||
\*/
|
\*/
|
||||||
|
(function(){
|
||||||
|
|
||||||
|
/*jslint node: true, browser: true */
|
||||||
|
/*global $tw: false */
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
exports["focus-editor"] = function(event,operation) {
|
exports["focus-editor"] = function(event,operation) {
|
||||||
operation = null;
|
operation = null;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
})();
|
||||||
@@ -6,7 +6,10 @@ module-type: texteditoroperation
|
|||||||
Text editor operation insert text at the caret position. If there is a selection it is replaced.
|
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";
|
"use strict";
|
||||||
|
|
||||||
exports["insert-text"] = function(event,operation) {
|
exports["insert-text"] = function(event,operation) {
|
||||||
@@ -16,3 +19,5 @@ exports["insert-text"] = function(event,operation) {
|
|||||||
operation.newSelStart = operation.selStart + operation.replacement.length;
|
operation.newSelStart = operation.selStart + operation.replacement.length;
|
||||||
operation.newSelEnd = operation.newSelStart;
|
operation.newSelEnd = operation.newSelStart;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
})();
|
||||||
|
|||||||
@@ -6,7 +6,10 @@ module-type: texteditoroperation
|
|||||||
Text editor operation to make a link
|
Text editor operation to make a link
|
||||||
|
|
||||||
\*/
|
\*/
|
||||||
|
(function(){
|
||||||
|
|
||||||
|
/*jslint node: true, browser: true */
|
||||||
|
/*global $tw: false */
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
exports["make-link"] = function(event,operation) {
|
exports["make-link"] = function(event,operation) {
|
||||||
@@ -22,3 +25,5 @@ exports["make-link"] = function(event,operation) {
|
|||||||
operation.newSelStart = operation.selStart + operation.replacement.length;
|
operation.newSelStart = operation.selStart + operation.replacement.length;
|
||||||
operation.newSelEnd = operation.newSelStart;
|
operation.newSelEnd = operation.newSelStart;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
})();
|
||||||
|
|||||||
@@ -6,7 +6,10 @@ module-type: texteditoroperation
|
|||||||
Text editor operation to add a prefix to the selected lines
|
Text editor operation to add a prefix to the selected lines
|
||||||
|
|
||||||
\*/
|
\*/
|
||||||
|
(function(){
|
||||||
|
|
||||||
|
/*jslint node: true, browser: true */
|
||||||
|
/*global $tw: false */
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
exports["prefix-lines"] = function(event,operation) {
|
exports["prefix-lines"] = function(event,operation) {
|
||||||
@@ -48,3 +51,5 @@ exports["prefix-lines"] = function(event,operation) {
|
|||||||
operation.newSelEnd = operation.newSelStart + operation.replacement.length;
|
operation.newSelEnd = operation.newSelStart + operation.replacement.length;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
})();
|
||||||
|
|||||||
@@ -6,7 +6,10 @@ module-type: texteditoroperation
|
|||||||
Text editor operation to replace the entire text
|
Text editor operation to replace the entire text
|
||||||
|
|
||||||
\*/
|
\*/
|
||||||
|
(function(){
|
||||||
|
|
||||||
|
/*jslint node: true, browser: true */
|
||||||
|
/*global $tw: false */
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
exports["replace-all"] = function(event,operation) {
|
exports["replace-all"] = function(event,operation) {
|
||||||
@@ -16,3 +19,5 @@ exports["replace-all"] = function(event,operation) {
|
|||||||
operation.newSelStart = 0;
|
operation.newSelStart = 0;
|
||||||
operation.newSelEnd = operation.replacement.length;
|
operation.newSelEnd = operation.replacement.length;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
})();
|
||||||
|
|||||||
@@ -6,7 +6,10 @@ module-type: texteditoroperation
|
|||||||
Text editor operation to replace the selection
|
Text editor operation to replace the selection
|
||||||
|
|
||||||
\*/
|
\*/
|
||||||
|
(function(){
|
||||||
|
|
||||||
|
/*jslint node: true, browser: true */
|
||||||
|
/*global $tw: false */
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
exports["replace-selection"] = function(event,operation) {
|
exports["replace-selection"] = function(event,operation) {
|
||||||
@@ -16,3 +19,5 @@ exports["replace-selection"] = function(event,operation) {
|
|||||||
operation.newSelStart = operation.selStart;
|
operation.newSelStart = operation.selStart;
|
||||||
operation.newSelEnd = operation.selStart + operation.replacement.length;
|
operation.newSelEnd = operation.selStart + operation.replacement.length;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
})();
|
||||||
|
|||||||
@@ -6,7 +6,10 @@ module-type: texteditoroperation
|
|||||||
Text editor operation to save the current selection in a specified tiddler
|
Text editor operation to save the current selection in a specified tiddler
|
||||||
|
|
||||||
\*/
|
\*/
|
||||||
|
(function(){
|
||||||
|
|
||||||
|
/*jslint node: true, browser: true */
|
||||||
|
/*global $tw: false */
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
exports["save-selection"] = function(event,operation) {
|
exports["save-selection"] = function(event,operation) {
|
||||||
@@ -16,3 +19,5 @@ exports["save-selection"] = function(event,operation) {
|
|||||||
this.wiki.setText(tiddler,field,null,operation.text.substring(operation.selStart,operation.selEnd));
|
this.wiki.setText(tiddler,field,null,operation.text.substring(operation.selStart,operation.selEnd));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
})();
|
||||||
|
|||||||
@@ -6,7 +6,10 @@ module-type: texteditoroperation
|
|||||||
Text editor operation to wrap the selected lines with a prefix and suffix
|
Text editor operation to wrap the selected lines with a prefix and suffix
|
||||||
|
|
||||||
\*/
|
\*/
|
||||||
|
(function(){
|
||||||
|
|
||||||
|
/*jslint node: true, browser: true */
|
||||||
|
/*global $tw: false */
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
exports["wrap-lines"] = function(event,operation) {
|
exports["wrap-lines"] = function(event,operation) {
|
||||||
@@ -40,3 +43,5 @@ exports["wrap-lines"] = function(event,operation) {
|
|||||||
operation.newSelEnd = operation.newSelStart + (operation.cutEnd - operation.cutStart);
|
operation.newSelEnd = operation.newSelStart + (operation.cutEnd - operation.cutStart);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
})();
|
||||||
|
|||||||
@@ -6,128 +6,45 @@ module-type: texteditoroperation
|
|||||||
Text editor operation to wrap the selection with the specified prefix and suffix
|
Text editor operation to wrap the selection with the specified prefix and suffix
|
||||||
|
|
||||||
\*/
|
\*/
|
||||||
|
(function(){
|
||||||
|
|
||||||
|
/*jslint node: true, browser: true */
|
||||||
|
/*global $tw: false */
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
exports["wrap-selection"] = function(event,operation) {
|
exports["wrap-selection"] = function(event,operation) {
|
||||||
var o = operation,
|
if(operation.selStart === operation.selEnd) {
|
||||||
prefix = event.paramObject.prefix,
|
// No selection; check if we're within the prefix/suffix
|
||||||
suffix = event.paramObject.suffix,
|
if(operation.text.substring(operation.selStart - event.paramObject.prefix.length,operation.selStart + event.paramObject.suffix.length) === event.paramObject.prefix + event.paramObject.suffix) {
|
||||||
trimSelection = event.paramObject.trimSelection || "no",
|
|
||||||
selLength = o.selEnd - o.selStart;
|
|
||||||
|
|
||||||
// This function detects, if trailing spaces are part of the selection __and__ if the user wants to handle them
|
|
||||||
// Returns "yes", "start", "end", "no" (default)
|
|
||||||
// yes .. there are trailing spaces at both ends
|
|
||||||
// start .. there are trailing spaces at the start
|
|
||||||
// end .. there are trailing spaces at the end
|
|
||||||
// no .. no trailing spaces are taken into account
|
|
||||||
var trailingSpaceAt = function(sel) {
|
|
||||||
var _start,
|
|
||||||
_end,
|
|
||||||
result;
|
|
||||||
// trimSelection is a user parameter, which this evaluations takes into account
|
|
||||||
switch(trimSelection) {
|
|
||||||
case "end":
|
|
||||||
result = (sel.trimEnd().length !== selLength) ? "end" : "no";
|
|
||||||
break;
|
|
||||||
case "yes":
|
|
||||||
_start = sel.trimStart().length !== selLength;
|
|
||||||
_end = sel.trimEnd().length !== selLength;
|
|
||||||
result = (_start && _end) ? "yes" : (_start) ? "start" : (_end) ? "end" : "no";
|
|
||||||
break;
|
|
||||||
case "start":
|
|
||||||
result = (sel.trimStart().length !== selLength) ? "start" : "no";
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
result = "no";
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
function togglePrefixSuffix() {
|
|
||||||
if(o.text.substring(o.selStart - prefix.length, o.selStart + suffix.length) === prefix + suffix) {
|
|
||||||
// Remove the prefix and suffix
|
// Remove the prefix and suffix
|
||||||
o.cutStart = o.selStart - prefix.length;
|
operation.cutStart = operation.selStart - event.paramObject.prefix.length;
|
||||||
o.cutEnd = o.selEnd + suffix.length;
|
operation.cutEnd = operation.selEnd + event.paramObject.suffix.length;
|
||||||
o.replacement = "";
|
operation.replacement = "";
|
||||||
o.newSelStart = o.cutStart;
|
operation.newSelStart = operation.cutStart;
|
||||||
o.newSelEnd = o.newSelStart;
|
operation.newSelEnd = operation.newSelStart;
|
||||||
} else {
|
} else {
|
||||||
// Wrap the cursor instead
|
// Wrap the cursor instead
|
||||||
o.cutStart = o.selStart;
|
operation.cutStart = operation.selStart;
|
||||||
o.cutEnd = o.selEnd;
|
operation.cutEnd = operation.selEnd;
|
||||||
o.replacement = prefix + suffix;
|
operation.replacement = event.paramObject.prefix + event.paramObject.suffix;
|
||||||
o.newSelStart = o.selStart + prefix.length;
|
operation.newSelStart = operation.selStart + event.paramObject.prefix.length;
|
||||||
o.newSelEnd = o.newSelStart;
|
operation.newSelEnd = operation.newSelStart;
|
||||||
}
|
}
|
||||||
}
|
} else if(operation.text.substring(operation.selStart,operation.selStart + event.paramObject.prefix.length) === event.paramObject.prefix && operation.text.substring(operation.selEnd - event.paramObject.suffix.length,operation.selEnd) === event.paramObject.suffix) {
|
||||||
|
|
||||||
// options: lenPrefix, lenSuffix
|
|
||||||
function removePrefixSuffix(options) {
|
|
||||||
options = options || {};
|
|
||||||
var _lenPrefix = options.lenPrefix || 0;
|
|
||||||
var _lenSuffix = options.lenSuffix || 0;
|
|
||||||
|
|
||||||
o.cutStart = o.selStart - _lenPrefix;
|
|
||||||
o.cutEnd = o.selEnd + _lenSuffix;
|
|
||||||
o.replacement = (_lenPrefix || _lenSuffix) ? o.selection : o.selection.substring(prefix.length, o.selection.length - suffix.length);
|
|
||||||
o.newSelStart = o.cutStart;
|
|
||||||
o.newSelEnd = o.cutStart + o.replacement.length;
|
|
||||||
}
|
|
||||||
|
|
||||||
function addPrefixSuffix() {
|
|
||||||
// remove trailing space if requested
|
|
||||||
switch(trailingSpaceAt(o.selection)) {
|
|
||||||
case "no":
|
|
||||||
// has no trailing spaces
|
|
||||||
o.cutStart = o.selStart;
|
|
||||||
o.cutEnd = o.selEnd;
|
|
||||||
o.replacement = prefix + o.selection + suffix;
|
|
||||||
o.newSelStart = o.selStart;
|
|
||||||
o.newSelEnd = o.selStart + o.replacement.length;
|
|
||||||
break;
|
|
||||||
case "yes":
|
|
||||||
// handle both ends
|
|
||||||
o.cutStart = o.selEnd - (o.selection.trimStart().length);
|
|
||||||
o.cutEnd = o.selection.trimEnd().length + o.selStart;
|
|
||||||
o.replacement = prefix + o.selection.trim() + suffix;
|
|
||||||
o.newSelStart = o.cutStart;
|
|
||||||
o.newSelEnd = o.cutStart + o.replacement.length;
|
|
||||||
break;
|
|
||||||
case "start":
|
|
||||||
// handle leading
|
|
||||||
o.cutStart = o.selEnd - (o.selection.trimStart().length);
|
|
||||||
o.cutEnd = o.selEnd;
|
|
||||||
o.replacement = prefix + o.selection.trimStart() + suffix;
|
|
||||||
o.newSelStart = o.cutStart;
|
|
||||||
o.newSelEnd = o.cutStart + o.replacement.length;
|
|
||||||
break;
|
|
||||||
case "end":
|
|
||||||
// handle trailing
|
|
||||||
o.cutStart = o.selStart;
|
|
||||||
o.cutEnd = o.selection.trimEnd().length + o.selStart;
|
|
||||||
o.replacement = prefix + o.selection.trimEnd() + suffix;
|
|
||||||
o.newSelStart = o.selStart;
|
|
||||||
o.newSelEnd = o.selStart + o.replacement.length;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if(o.selStart === o.selEnd) {
|
|
||||||
// No selection; Create prefix and suffix. Set cursor in between them: ""|""
|
|
||||||
togglePrefixSuffix();
|
|
||||||
} else if(o.text.substring(o.selStart, o.selStart + prefix.length) === prefix &&
|
|
||||||
o.text.substring(o.selEnd - suffix.length,o.selEnd) === suffix) {
|
|
||||||
// Prefix and suffix are already present, so remove them
|
// Prefix and suffix are already present, so remove them
|
||||||
removePrefixSuffix();
|
operation.cutStart = operation.selStart;
|
||||||
} else if(o.text.substring(o.selStart - prefix.length, o.selStart) === prefix &&
|
operation.cutEnd = operation.selEnd;
|
||||||
o.text.substring(o.selEnd, o.selEnd + suffix.length) === suffix) {
|
operation.replacement = operation.selection.substring(event.paramObject.prefix.length,operation.selection.length - event.paramObject.suffix.length);
|
||||||
// Prefix and suffix are present BUT not selected -> remove them
|
operation.newSelStart = operation.selStart;
|
||||||
removePrefixSuffix({"lenPrefix": prefix.length, "lenSuffix": suffix.length});
|
operation.newSelEnd = operation.selStart + operation.replacement.length;
|
||||||
} else {
|
} else {
|
||||||
// Add the prefix and suffix
|
// Add the prefix and suffix
|
||||||
addPrefixSuffix();
|
operation.cutStart = operation.selStart;
|
||||||
|
operation.cutEnd = operation.selEnd;
|
||||||
|
operation.replacement = event.paramObject.prefix + operation.selection + event.paramObject.suffix;
|
||||||
|
operation.newSelStart = operation.selStart;
|
||||||
|
operation.newSelEnd = operation.selStart + operation.replacement.length;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
})();
|
||||||
|
|||||||
@@ -7,7 +7,10 @@ Union of sets without de-duplication.
|
|||||||
Equivalent to = filter run prefix.
|
Equivalent to = filter run prefix.
|
||||||
|
|
||||||
\*/
|
\*/
|
||||||
|
(function(){
|
||||||
|
|
||||||
|
/*jslint node: true, browser: true */
|
||||||
|
/*global $tw: false */
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -18,3 +21,5 @@ exports.all = function(operationSubFunction) {
|
|||||||
results.push.apply(results, operationSubFunction(source,widget));
|
results.push.apply(results, operationSubFunction(source,widget));
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
})();
|
||||||
|
|||||||
@@ -7,7 +7,10 @@ Intersection of sets.
|
|||||||
Equivalent to + filter run prefix.
|
Equivalent to + filter run prefix.
|
||||||
|
|
||||||
\*/
|
\*/
|
||||||
|
(function(){
|
||||||
|
|
||||||
|
/*jslint node: true, browser: true */
|
||||||
|
/*global $tw: false */
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -21,3 +24,5 @@ exports.and = function(operationSubFunction,options) {
|
|||||||
results.pushTop(operationSubFunction(source,widget));
|
results.pushTop(operationSubFunction(source,widget));
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
})();
|
||||||
|
|||||||
@@ -3,7 +3,10 @@ title: $:/core/modules/filterrunprefixes/cascade.js
|
|||||||
type: application/javascript
|
type: application/javascript
|
||||||
module-type: filterrunprefix
|
module-type: filterrunprefix
|
||||||
\*/
|
\*/
|
||||||
|
(function(){
|
||||||
|
|
||||||
|
/*jslint node: true, browser: true */
|
||||||
|
/*global $tw: false */
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -36,3 +39,5 @@ exports.cascade = function(operationSubFunction,options) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
})();
|
||||||
@@ -6,7 +6,10 @@ module-type: filterrunprefix
|
|||||||
Equivalent to ~ filter run prefix.
|
Equivalent to ~ filter run prefix.
|
||||||
|
|
||||||
\*/
|
\*/
|
||||||
|
(function(){
|
||||||
|
|
||||||
|
/*jslint node: true, browser: true */
|
||||||
|
/*global $tw: false */
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -20,3 +23,5 @@ exports.else = function(operationSubFunction) {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
})();
|
||||||
|
|||||||
@@ -7,7 +7,10 @@ Difference of sets.
|
|||||||
Equivalent to - filter run prefix.
|
Equivalent to - filter run prefix.
|
||||||
|
|
||||||
\*/
|
\*/
|
||||||
|
(function(){
|
||||||
|
|
||||||
|
/*jslint node: true, browser: true */
|
||||||
|
/*global $tw: false */
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -18,3 +21,5 @@ exports.except = function(operationSubFunction) {
|
|||||||
results.remove(operationSubFunction(source,widget));
|
results.remove(operationSubFunction(source,widget));
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
})();
|
||||||
|
|||||||
@@ -4,7 +4,10 @@ type: application/javascript
|
|||||||
module-type: filterrunprefix
|
module-type: filterrunprefix
|
||||||
|
|
||||||
\*/
|
\*/
|
||||||
|
(function(){
|
||||||
|
|
||||||
|
/*jslint node: true, browser: true */
|
||||||
|
/*global $tw: false */
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -32,3 +35,5 @@ exports.filter = function(operationSubFunction,options) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
})();
|
||||||
|
|||||||
@@ -4,7 +4,10 @@ type: application/javascript
|
|||||||
module-type: filterrunprefix
|
module-type: filterrunprefix
|
||||||
|
|
||||||
\*/
|
\*/
|
||||||
|
(function(){
|
||||||
|
|
||||||
|
/*jslint node: true, browser: true */
|
||||||
|
/*global $tw: false */
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -24,3 +27,5 @@ exports.intersection = function(operationSubFunction) {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
})();
|
||||||
|
|||||||
@@ -3,7 +3,10 @@ title: $:/core/modules/filterrunprefixes/map.js
|
|||||||
type: application/javascript
|
type: application/javascript
|
||||||
module-type: filterrunprefix
|
module-type: filterrunprefix
|
||||||
\*/
|
\*/
|
||||||
|
(function(){
|
||||||
|
|
||||||
|
/*jslint node: true, browser: true */
|
||||||
|
/*global $tw: false */
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -37,3 +40,5 @@ exports.map = function(operationSubFunction,options) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
})();
|
||||||
@@ -6,7 +6,10 @@ module-type: filterrunprefix
|
|||||||
Equivalent to a filter run with no prefix.
|
Equivalent to a filter run with no prefix.
|
||||||
|
|
||||||
\*/
|
\*/
|
||||||
|
(function(){
|
||||||
|
|
||||||
|
/*jslint node: true, browser: true */
|
||||||
|
/*global $tw: false */
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -17,3 +20,5 @@ exports.or = function(operationSubFunction) {
|
|||||||
results.pushTop(operationSubFunction(source,widget));
|
results.pushTop(operationSubFunction(source,widget));
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
})();
|
||||||
|
|||||||
@@ -3,7 +3,10 @@ title: $:/core/modules/filterrunprefixes/reduce.js
|
|||||||
type: application/javascript
|
type: application/javascript
|
||||||
module-type: filterrunprefix
|
module-type: filterrunprefix
|
||||||
\*/
|
\*/
|
||||||
|
(function(){
|
||||||
|
|
||||||
|
/*jslint node: true, browser: true */
|
||||||
|
/*global $tw: false */
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -33,3 +36,5 @@ exports.reduce = function(operationSubFunction,options) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
})();
|
||||||
|
|||||||
@@ -4,7 +4,10 @@ type: application/javascript
|
|||||||
module-type: filterrunprefix
|
module-type: filterrunprefix
|
||||||
|
|
||||||
\*/
|
\*/
|
||||||
|
(function(){
|
||||||
|
|
||||||
|
/*jslint node: true, browser: true */
|
||||||
|
/*global $tw: false */
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -45,3 +48,5 @@ exports.sort = function(operationSubFunction,options) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
})();
|
||||||
@@ -6,7 +6,10 @@ module-type: filterrunprefix
|
|||||||
Replace results of previous runs unless empty
|
Replace results of previous runs unless empty
|
||||||
|
|
||||||
\*/
|
\*/
|
||||||
|
(function(){
|
||||||
|
|
||||||
|
/*jslint node: true, browser: true */
|
||||||
|
/*global $tw: false */
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -25,3 +28,5 @@ exports.then = function(operationSubFunction) {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
})();
|
||||||
|
|||||||
@@ -6,7 +6,10 @@ module-type: wikimethod
|
|||||||
Adds tiddler filtering methods to the $tw.Wiki object.
|
Adds tiddler filtering methods to the $tw.Wiki object.
|
||||||
|
|
||||||
\*/
|
\*/
|
||||||
|
(function(){
|
||||||
|
|
||||||
|
/*jslint node: true, browser: true */
|
||||||
|
/*global $tw: false */
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
var widgetClass = require("$:/core/modules/widgets/widget.js").widget;
|
var widgetClass = require("$:/core/modules/widgets/widget.js").widget;
|
||||||
@@ -364,3 +367,5 @@ exports.compileFilter = function(filterString) {
|
|||||||
this.filterCacheCount++;
|
this.filterCacheCount++;
|
||||||
return fnMeasured;
|
return fnMeasured;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
})();
|
||||||
|
|||||||
@@ -8,7 +8,10 @@ especially useful in contexts where only a filter expression is allowed
|
|||||||
and macro substitution isn't available.
|
and macro substitution isn't available.
|
||||||
|
|
||||||
\*/
|
\*/
|
||||||
|
(function(){
|
||||||
|
|
||||||
|
/*jslint node: true, browser: true */
|
||||||
|
/*global $tw: false */
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -21,3 +24,5 @@ exports.addprefix = function(source,operator,options) {
|
|||||||
});
|
});
|
||||||
return results;
|
return results;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
})();
|
||||||
|
|||||||
@@ -8,7 +8,10 @@ especially useful in contexts where only a filter expression is allowed
|
|||||||
and macro substitution isn't available.
|
and macro substitution isn't available.
|
||||||
|
|
||||||
\*/
|
\*/
|
||||||
|
(function(){
|
||||||
|
|
||||||
|
/*jslint node: true, browser: true */
|
||||||
|
/*global $tw: false */
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -21,3 +24,5 @@ exports.addsuffix = function(source,operator,options) {
|
|||||||
});
|
});
|
||||||
return results;
|
return results;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
})();
|
||||||
|
|||||||
@@ -6,7 +6,10 @@ module-type: filteroperator
|
|||||||
Filter operator returning the tiddler from the current list that is after the tiddler named in the operand.
|
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";
|
"use strict";
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -24,3 +27,5 @@ exports.after = function(source,operator,options) {
|
|||||||
return [results[index + 1]];
|
return [results[index + 1]];
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
})();
|
||||||
|
|||||||
@@ -8,7 +8,10 @@ Filter operator for selecting tiddlers
|
|||||||
[all[shadows+tiddlers]]
|
[all[shadows+tiddlers]]
|
||||||
|
|
||||||
\*/
|
\*/
|
||||||
|
(function(){
|
||||||
|
|
||||||
|
/*jslint node: true, browser: true */
|
||||||
|
/*global $tw: false */
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
var allFilterOperators;
|
var allFilterOperators;
|
||||||
@@ -51,3 +54,5 @@ exports.all = function(source,operator,options) {
|
|||||||
}
|
}
|
||||||
return results.makeTiddlerIterator(options.wiki);
|
return results.makeTiddlerIterator(options.wiki);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
})();
|
||||||
|
|||||||
@@ -6,7 +6,10 @@ module-type: allfilteroperator
|
|||||||
Filter function for [all[current]]
|
Filter function for [all[current]]
|
||||||
|
|
||||||
\*/
|
\*/
|
||||||
|
(function(){
|
||||||
|
|
||||||
|
/*jslint node: true, browser: true */
|
||||||
|
/*global $tw: false */
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -20,3 +23,5 @@ exports.current = function(source,prefix,options) {
|
|||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
})();
|
||||||
|
|||||||
@@ -6,7 +6,10 @@ module-type: allfilteroperator
|
|||||||
Filter function for [all[missing]]
|
Filter function for [all[missing]]
|
||||||
|
|
||||||
\*/
|
\*/
|
||||||
|
(function(){
|
||||||
|
|
||||||
|
/*jslint node: true, browser: true */
|
||||||
|
/*global $tw: false */
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -15,3 +18,5 @@ Export our filter function
|
|||||||
exports.missing = function(source,prefix,options) {
|
exports.missing = function(source,prefix,options) {
|
||||||
return options.wiki.getMissingTitles();
|
return options.wiki.getMissingTitles();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
})();
|
||||||
|
|||||||
@@ -6,7 +6,10 @@ module-type: allfilteroperator
|
|||||||
Filter function for [all[orphans]]
|
Filter function for [all[orphans]]
|
||||||
|
|
||||||
\*/
|
\*/
|
||||||
|
(function(){
|
||||||
|
|
||||||
|
/*jslint node: true, browser: true */
|
||||||
|
/*global $tw: false */
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -15,3 +18,5 @@ Export our filter function
|
|||||||
exports.orphans = function(source,prefix,options) {
|
exports.orphans = function(source,prefix,options) {
|
||||||
return options.wiki.getOrphanTitles();
|
return options.wiki.getOrphanTitles();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
})();
|
||||||
|
|||||||
@@ -6,7 +6,10 @@ module-type: allfilteroperator
|
|||||||
Filter function for [all[shadows]]
|
Filter function for [all[shadows]]
|
||||||
|
|
||||||
\*/
|
\*/
|
||||||
|
(function(){
|
||||||
|
|
||||||
|
/*jslint node: true, browser: true */
|
||||||
|
/*global $tw: false */
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -15,3 +18,5 @@ Export our filter function
|
|||||||
exports.shadows = function(source,prefix,options) {
|
exports.shadows = function(source,prefix,options) {
|
||||||
return options.wiki.allShadowTitles();
|
return options.wiki.allShadowTitles();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
})();
|
||||||
|
|||||||
@@ -6,7 +6,10 @@ module-type: allfilteroperator
|
|||||||
Filter function for [all[tags]]
|
Filter function for [all[tags]]
|
||||||
|
|
||||||
\*/
|
\*/
|
||||||
|
(function(){
|
||||||
|
|
||||||
|
/*jslint node: true, browser: true */
|
||||||
|
/*global $tw: false */
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -15,3 +18,5 @@ Export our filter function
|
|||||||
exports.tags = function(source,prefix,options) {
|
exports.tags = function(source,prefix,options) {
|
||||||
return Object.keys(options.wiki.getTagMap());
|
return Object.keys(options.wiki.getTagMap());
|
||||||
};
|
};
|
||||||
|
|
||||||
|
})();
|
||||||
|
|||||||
@@ -6,7 +6,10 @@ module-type: allfilteroperator
|
|||||||
Filter function for [all[tiddlers]]
|
Filter function for [all[tiddlers]]
|
||||||
|
|
||||||
\*/
|
\*/
|
||||||
|
(function(){
|
||||||
|
|
||||||
|
/*jslint node: true, browser: true */
|
||||||
|
/*global $tw: false */
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -15,3 +18,5 @@ Export our filter function
|
|||||||
exports.tiddlers = function(source,prefix,options) {
|
exports.tiddlers = function(source,prefix,options) {
|
||||||
return options.wiki.allTitles();
|
return options.wiki.allTitles();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
})();
|
||||||
|
|||||||
@@ -6,7 +6,10 @@ module-type: filteroperator
|
|||||||
Filter operator for returning all the backlinks from a tiddler
|
Filter operator for returning all the backlinks from a tiddler
|
||||||
|
|
||||||
\*/
|
\*/
|
||||||
|
(function(){
|
||||||
|
|
||||||
|
/*jslint node: true, browser: true */
|
||||||
|
/*global $tw: false */
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -19,3 +22,5 @@ exports.backlinks = function(source,operator,options) {
|
|||||||
});
|
});
|
||||||
return results.makeTiddlerIterator(options.wiki);
|
return results.makeTiddlerIterator(options.wiki);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
})();
|
||||||
|
|||||||
@@ -7,6 +7,9 @@ Filter operator for returning all the backtranscludes from a tiddler
|
|||||||
|
|
||||||
\*/
|
\*/
|
||||||
(function(){
|
(function(){
|
||||||
|
|
||||||
|
/*jslint node: true, browser: true */
|
||||||
|
/*global $tw: false */
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -6,7 +6,10 @@ module-type: filteroperator
|
|||||||
Filter operator returning the tiddler from the current list that is before the tiddler named in the operand.
|
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";
|
"use strict";
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -24,3 +27,5 @@ exports.before = function(source,operator,options) {
|
|||||||
return [results[index - 1]];
|
return [results[index - 1]];
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
})();
|
||||||
|
|||||||
@@ -6,7 +6,10 @@ module-type: filteroperator
|
|||||||
Filter operator for returning the names of the commands available in this wiki
|
Filter operator for returning the names of the commands available in this wiki
|
||||||
|
|
||||||
\*/
|
\*/
|
||||||
|
(function(){
|
||||||
|
|
||||||
|
/*jslint node: true, browser: true */
|
||||||
|
/*global $tw: false */
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -20,3 +23,5 @@ exports.commands = function(source,operator,options) {
|
|||||||
results.sort();
|
results.sort();
|
||||||
return results;
|
return results;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
})();
|
||||||
|
|||||||
@@ -6,7 +6,10 @@ module-type: filteroperator
|
|||||||
General purpose comparison operator
|
General purpose comparison operator
|
||||||
|
|
||||||
\*/
|
\*/
|
||||||
|
(function(){
|
||||||
|
|
||||||
|
/*jslint node: true, browser: true */
|
||||||
|
/*global $tw: false */
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
exports.compare = function(source,operator,options) {
|
exports.compare = function(source,operator,options) {
|
||||||
@@ -33,3 +36,5 @@ var modes = {
|
|||||||
"lteq": function(value) {return value <= 0;},
|
"lteq": function(value) {return value <= 0;},
|
||||||
"lt": function(value) {return value < 0;}
|
"lt": function(value) {return value < 0;}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
})();
|
||||||
|
|||||||
@@ -6,7 +6,10 @@ module-type: filteroperator
|
|||||||
Filter operator for finding values in array fields
|
Filter operator for finding values in array fields
|
||||||
|
|
||||||
\*/
|
\*/
|
||||||
|
(function(){
|
||||||
|
|
||||||
|
/*jslint node: true, browser: true */
|
||||||
|
/*global $tw: false */
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -38,3 +41,5 @@ exports.contains = function(source,operator,options) {
|
|||||||
}
|
}
|
||||||
return results;
|
return results;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
})();
|
||||||
|
|||||||
@@ -6,7 +6,10 @@ module-type: filteroperator
|
|||||||
Filter operator returning the number of entries in the current list.
|
Filter operator returning the number of entries in the current list.
|
||||||
|
|
||||||
\*/
|
\*/
|
||||||
|
(function(){
|
||||||
|
|
||||||
|
/*jslint node: true, browser: true */
|
||||||
|
/*global $tw: false */
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -19,3 +22,5 @@ exports.count = function(source,operator,options) {
|
|||||||
});
|
});
|
||||||
return [count + ""];
|
return [count + ""];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
})();
|
||||||
|
|||||||
@@ -6,7 +6,10 @@ module-type: filteroperator
|
|||||||
Filter operators for cryptography, using the Stanford JavaScript library
|
Filter operators for cryptography, using the Stanford JavaScript library
|
||||||
|
|
||||||
\*/
|
\*/
|
||||||
|
(function(){
|
||||||
|
|
||||||
|
/*jslint node: true, browser: true */
|
||||||
|
/*global $tw: false */
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
exports.sha256 = function(source,operator,options) {
|
exports.sha256 = function(source,operator,options) {
|
||||||
@@ -17,3 +20,5 @@ exports.sha256 = function(source,operator,options) {
|
|||||||
});
|
});
|
||||||
return results;
|
return results;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
})();
|
||||||
|
|||||||
@@ -6,7 +6,10 @@ module-type: filteroperator
|
|||||||
Filter operator that selects tiddlers with a specified date field within a specified date interval.
|
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";
|
"use strict";
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -43,3 +46,5 @@ exports.days = function(source,operator,options) {
|
|||||||
}
|
}
|
||||||
return results;
|
return results;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
})();
|
||||||
|
|||||||
@@ -4,7 +4,10 @@ type: application/javascript
|
|||||||
module-type: filteroperator
|
module-type: filteroperator
|
||||||
Filter operator for deserializing string data into JSON representing tiddlers
|
Filter operator for deserializing string data into JSON representing tiddlers
|
||||||
\*/
|
\*/
|
||||||
|
(function(){
|
||||||
|
|
||||||
|
/*jslint node: true, browser: true */
|
||||||
|
/*global $tw: false */
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
exports["deserialize"] = function(source,operator,options) {
|
exports["deserialize"] = function(source,operator,options) {
|
||||||
@@ -32,3 +35,5 @@ exports["deserialize"] = function(source,operator,options) {
|
|||||||
}
|
}
|
||||||
return results;
|
return results;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
})();
|
||||||
@@ -6,7 +6,10 @@ module-type: filteroperator
|
|||||||
Filter operator for returning the names of the deserializers in this wiki
|
Filter operator for returning the names of the deserializers in this wiki
|
||||||
|
|
||||||
\*/
|
\*/
|
||||||
|
(function(){
|
||||||
|
|
||||||
|
/*jslint node: true, browser: true */
|
||||||
|
/*global $tw: false */
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -20,3 +23,5 @@ exports.deserializers = function(source,operator,options) {
|
|||||||
results.sort();
|
results.sort();
|
||||||
return results;
|
return results;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
})();
|
||||||
@@ -6,7 +6,10 @@ module-type: filteroperator
|
|||||||
Filter function for [duplicateslugs[]]
|
Filter function for [duplicateslugs[]]
|
||||||
|
|
||||||
\*/
|
\*/
|
||||||
|
(function(){
|
||||||
|
|
||||||
|
/*jslint node: true, browser: true */
|
||||||
|
/*global $tw: false */
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -29,3 +32,5 @@ exports.duplicateslugs = function(source,operator,options) {
|
|||||||
});
|
});
|
||||||
return results;
|
return results;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
})();
|
||||||
|
|||||||
@@ -7,7 +7,10 @@ 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.
|
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";
|
"use strict";
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -60,3 +63,5 @@ exports.each = function(source,operator,options) {
|
|||||||
}
|
}
|
||||||
return results;
|
return results;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
})();
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user