1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-04-21 02:03:13 +00:00

346 Commits

Author SHA1 Message Date
Jeremy Ruston
c05400021c Merge branch 'master' into intrinsic-sub-plugins 2025-03-21 17:24:56 +00:00
Jeremy Ruston
55dbce10f4 Fix crash loading large files
Attempts to load large files are neutered with a warning message

Is 100MB the right limit?
2025-03-21 14:48:01 +00:00
Jeremy Ruston
55c634692b Deal with dynamic loading and unloading of plugins
More enhancements needed for the test framework too in order to allow events to be processed manually, without relying on the nexttick handler which is awkward in Jasmine
2025-02-21 09:36:40 +00:00
Jeremy Ruston
7e2a8238b5 Clarify comment 2025-02-18 21:17:34 +00:00
Jeremy Ruston
afabe5b714 More efficient checks if a tiddler is a plugin 2025-02-18 17:30:11 +00:00
Jeremy Ruston
6b0a13b8cc Basic loading of bundled subplugins
Very basic. Doesn't cope with any changes to the plugins after startup, and doesn't remove sub-plugins when the parent plugin is removed.
2025-02-18 09:14:54 +00:00
Jeremy Ruston
e8de413fba More refactoring for clarity 2025-02-17 16:31:42 +00:00
Jeremy Ruston
4cbf1b4d91 Refactor some symbols for clarity
All these symbols are inaccessible outside the wiki class closure, and so no backwards compatibility issues
2025-02-16 19:32:56 +00:00
Jeremy Ruston
778e544f1c Initial Commit 2025-02-16 18:20:00 +00:00
Leilei332
fbe5a2f908
Fix incorrect downloaded file extension (#8928)
* Fix incorrect downloaded file extension

* Update docs
2025-02-14 18:17:00 +00:00
Saq Imtiaz
f02c9ebba3
feat: support for avif images (#8911) 2025-01-26 12:25:01 +00:00
Galen Huntington
b04af8bf7a
Bug fix: TTF extension was wrong. update font types, add OTF type. (#8898)
* Bug fix: TTF extension was wrong.

* Update font MIME types throughout; add font/otf.
2025-01-23 18:18:02 +00:00
lin onetwo
673a0f5605
Fix: allow overwrite plugin that don't have plugin-priority (#8800)
* fix: allow overwrite plugin that don't have plugin-priority

* Update boot.js

* Update boot.js
2024-12-05 12:37:37 +00:00
Mario Pietsch
014f302af3
Fix whitespace in boot.js (#8318) 2024-08-20 16:31:17 +01:00
Val Packett
886514aa52
bootprefix: Tighten browser check to include the document global (#8423)
Deno's node emulation can run TiddlyWiki now that it supports the VM isolates API, but the window global exists in that environment, so both browser and node were being detected, causing the autoboot to trip up on nonexistent argv, as the boot was happening in the constructor right before argv was set.

Ref: https://github.com/denoland/deno/issues/19286
Ref: https://github.com/flexdinesh/browser-or-node
2024-07-26 08:54:02 +01:00
Jeremy Ruston
da8d4ecfae Tweak #8214 by avoiding renaming boot.css
Improves the continuity of our GitHub history
2024-05-30 17:29:12 +01:00
lin onetwo
dbe912ba5d
Fix boot.css bug from #8099 (#8214) 2024-05-27 12:45:29 +01:00
lin onetwo
a463783283
Fix/sjcl variable (#8099)
* refactor: use files to add prefix

* fix: always use $tw.sjcl

* refactor: move sjcl to lib/sjcl

* fix: require sjcl in lib/

* refactor: move sjcl.js back into /boot
2024-05-26 15:56:25 +01:00
Mario Pietsch
074d35c388
Make the linter happy (#8210) 2024-05-23 18:13:52 +01:00
Jeremy Ruston
18d23048da Improve plugin test implementation 2024-05-23 16:47:28 +01:00
Jeremy Ruston
3543fe53ff
RSOE: Add emergency tiddlers download button (#7966) 2024-02-28 11:29:32 +00:00
Robin Munn
984863065e
Fix "sjcl not found" errors in TiddlyDesktop (#8007) 2024-02-26 11:36:46 +00:00
lin onetwo
111f71bcf5
Add doc xls ppt file type information (#7927)
* fix: add doc xls ppt type

* Add application/vnd.ms-excel
2024-02-05 17:02:10 +00:00
lin onetwo
2b1efac6ee
Fix: on Windows, tiddlywiki.files title source shoud use / instead of \ (#7949)
* fix: on Windows, tiddlywiki.files title source shoud use / instead of \

* fix: split path.sep instead of /
2024-02-05 17:00:09 +00:00
lin onetwo
207720cb30
Add WASM content type info (#7948)
Allows WASM modules to be loaded
2024-01-27 14:25:30 +00:00
lin onetwo
773c1f83f2
API for deleting core hooks (#7751)
* feat: Delete hooks from the hashmap

* fix: not using findIndex in the core

* Update HookMechanism.tid
2023-09-24 21:54:52 +01:00
lin onetwo
b8a235697f
Improve boot kernel error reporting to include original error message (#7645) 2023-07-31 12:19:10 +01:00
Jeremy Ruston
d0da1ef9d9
Fix error "Global assignment is not allowed within modules on node" (#7648) 2023-07-31 11:50:58 +01:00
Cameron Fischer
98ff6b67fd
Fixed boot so module line numbers are correct again (#7618) 2023-07-20 16:13:36 +01:00
Jeremy Ruston
a6779efb1c Use locale sort for shadows
For consistency and compatibility with non-shadow ordering
2023-07-14 12:41:04 +01:00
Jeremy Ruston
08bad90e51 Ensure shadow tiddler listings are always sorted
Currently shadow tiddler ordering depends upon the order in which the shadows appear in the plugin JSON
2023-07-13 19:27:50 +01:00
jeremy@jermolene.com
48b22abdaa Add a warning for tiddlywiki.info or plugin.info having json errors 2023-06-02 10:41:42 +01:00
Arlen22
90f0ff8067
Polyfill is not needed, only globalCheck (#7492) 2023-05-27 18:24:25 +02:00
Arlen22
2b95daf59b
Change evalSandboxed to use only one context for all modules (#4624)
* Run modules in one new context

* Fix polyfill running on require

* Add code to check for global assignments

* Allow globals in separate context

This lets the caller request a separate context which may be polluted.

* Jasmine needs to pollute the global

* Formatting

* Add polyfill and cleanup code

* Convert to ES5

* One bug fix

* Some formatting

* Remove console.log line!

* Cleanup

* revert css-escape-polyfill.js to hopefully remove it from the PR

* Remove JSDOC directives
2023-05-06 12:11:18 +01:00
donmor
4e96a012f6
Add missing extensions for audio/mpeg (#7378)
Add missing extensions for audio/mpeg
2023-05-06 11:55:41 +01:00
Michelle Saad
4e641f4fc0
Add 'filepath' source attribute to tiddlywiki.files (#7253)
* Add 'filepath' source attribute to tiddlywiki.files

Adds a new source attribute to facilitate importing subdirectories with
the `searchSubdirectories` attribute.

The `filepath` atttribute is like `filename` except it includes the full
pathname relative to the directory path. Consequently it only works with
`directories` sections (not `tiddlers`).

* Add `subdirectories` source attribute to tiddlywiki.files

Adds another new source attribute to facilitate importing subdirectories
with the `searchSubdirectories` attribute.

The `subdirectories` source attribute is only usable with `directories`
sections (not `tiddlers`). It resolves to an array containing all the
directories in the file's path relative to the directory path. Eg, if
the directory path is `files`, `{ source: 'subdirectories' }` for a file
in  `files/images/photos` would resolve to `['images', 'photos'].

This commit also adds an example to the "tiddlywiki.files Files"
documentation tiddler that demonstrates using the `filepath` and
`subdirectories` source attributes to import and auto-tag image files
as external-image tiddlers.
2023-05-06 11:26:40 +01:00
jeremy@jermolene.com
4e5c957e97 Further fix to whitespace handling in $tw.utils.stringifyList
Fixes typo in 3d0ec5b1bdc157f87d65b8c9b76e681c14337eb4

See 3d0ec5b1bd (commitcomment-97804850)
2023-01-23 19:36:13 +00:00
jeremy@jermolene.com
3d0ec5b1bd Fix handling of whitespace in $tw.utils.stringifyList
Fixes #7226
2023-01-23 17:16:51 +00:00
jeremy@jermolene.com
8f7441f296 Share plugin: Further fixes to c39ef398bffae12c0ed7324d9b6d9d29f0f2f9ff
See https://talk.tiddlywiki.org/t/revived-share-plugin/5887/14

Thanks @btheado
2023-01-17 14:34:06 +00:00
jeremy@jermolene.com
0b39e47ce8 Browsers import MP3 files as audio/mpeg, not audio/mp3
Chrome changed in v81 to match Firefox and Safari - https://stackoverflow.com/questions/61363934/chrome-81-mimetype-change-to-file-upload-of-audio-mp3

Fixes #7157
2022-12-30 09:34:38 +00:00
Mario Pietsch
9f69161709
Add ignore .github, .vscode to regexp (#7148) 2022-12-24 15:58:50 +00:00
jeremy@jermolene.com
344110e289 Rearrange ordering of MP4 extension so that it defaults to video not audio
Previously using the --load command to import an MP4 file would cause it to be recognised as autio/mp4 instead of video/mp4
2022-11-09 13:56:28 +00:00
jeremy@jermolene.com
53d229592d Optimise wiki.getTiddler() 2022-09-23 18:09:16 +01:00
jeremy@jermolene.com
c5d3d4c26e Disable wiki indexers in safe mode 2022-09-23 18:07:46 +01:00
jeremy@jermolene.com
bc242cf83a Fix bug introduced in #4122
Fixes #6579
2022-04-01 11:38:40 +01:00
Arlen22
adcef4f803
Fix possible bug (#4122)
Check for outstanding tasks to execute before the task in question seems to have invalid checks.
2022-03-30 19:39:21 +01:00
Jeremy Ruston
36b162a377
Fix for tag ordering issue #6382 (#6383)
* Failing test

* Fix underlying problem

* Less naive fix

Now we make sure we maintain the sort order of the titles array when adding a new tiddler

* Fix failing tests

* Refactor filter tests to repeat them with different store orderings

* Revert "Fix failing tests"

This reverts commit ee03ee57f59aa3a21a518c0190acbdd060497a49.

* Refine fix to retain stylesheet ordering

The order of tiddlers in the HTML file uses localeCompare(), and that determines the insertion order. So if we want to be compatible with older versions we have to use localeCompare() to order tiddlers, not a plain sort()

* Don't sort shadow tiddlers

Instead rely on the existing ordering

* Fix failing tests, take 2

I think that all of these changes are explained by the store no longer retaining insertion order, but now using localecompare ordering

* Fix tests from #6327
2022-02-21 15:34:05 +00:00
Jeremy Ruston
82c8fe7fa8
Introduce JSON parse utility function with error handling (#6401)
* Introduce JSON parse utility function with error handling

Fixes #6400

* Fix typo
2022-02-21 15:29:25 +00:00
Cameron Fischer
cbb002ec4b
Added sourceURL tags to boot js (#6381) 2022-01-03 17:25:40 +00:00
Joshua Fontany
e32c9e4658
Feature tiddlywiki.files "searchSubdirectories" flag (#5275)
* experimenting

* recurse flag for directories in tiddlywiki.files

* searchSubdirectories docs

* filesystem cleanup to seperate PR

* cleanup

* improved docs
2021-10-27 11:16:05 +01:00