mirror of
https://github.com/laurent22/joplin.git
synced 2024-11-27 08:21:03 +02:00
CLI v1.0.136
This commit is contained in:
parent
07e88b2eeb
commit
1924ea062c
2
CliClient/package-lock.json
generated
2
CliClient/package-lock.json
generated
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "joplin",
|
||||
"version": "1.0.135",
|
||||
"version": "1.0.136",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
|
@ -20,7 +20,7 @@
|
||||
],
|
||||
"owner": "Laurent Cozic"
|
||||
},
|
||||
"version": "1.0.135",
|
||||
"version": "1.0.136",
|
||||
"bin": {
|
||||
"joplin": "./main.js"
|
||||
},
|
||||
|
1
lib/rnInjectedJs/webviewLib.js
Normal file
1
lib/rnInjectedJs/webviewLib.js
Normal file
@ -0,0 +1 @@
|
||||
module.exports = "const webviewLib = {};\n\nlet manualDownloadResourceElements = [];\n\nwebviewLib.ipcProxySendToHost_ = null;\n\nwebviewLib.onUnloadedResourceClick = function(event) {\n\talert('test');\n\t// const resourceId = event.currentTarget.getAttribute('data-resource-id');\n\t// webviewLib.options_.postMessage('markForDownload', resourceId);\n}\n\nwebviewLib.setupResourceManualDownload = function() {\n\tfor (const element of manualDownloadResourceElements) {\n\t\telement.style.cursor = 'default';\n\t\telement.removeEventListener('click', webviewLib.onUnloadedResourceClick);\n\t}\n\n\tmanualDownloadResourceElements = [];\n\n\tconst elements = document.getElementsByClassName('resource-status-notDownloaded');\n\n\tfor (const element of elements) {\n\t\telement.style.cursor = 'pointer';\n\t\telement.addEventListener('click', webviewLib.onUnloadedResourceClick);\n\t\tmanualDownloadResourceElements.push(element);\n\t}\n}\n\nwebviewLib.handleInternalLink = function(event, anchorNode) {\n\tconst href = anchorNode.getAttribute('href');\n\tif (!href) return false;\n\n\tif (href.indexOf('#') === 0) {\n\t\tevent.preventDefault();\n\t\tlet old_hash = location.hash;\n\n\t\tlocation.hash = href;\n\n\t\t// HACK \n\t\t// For some reason anchors at the bottom cause the webview to move itself\n\t\t// so that the content is aligned with the top of the screen\n\t\t// This basically refreshes the scroll view so that is returns to a normal\n\t\t// position, the scroll positions stays correct though\n\t\t// Additionally an anchor could not be clicked twice because the location\n\t\t// would not change, this fixes that also\n\t\tsetTimeout(function() { location.hash = old_hash; }, 10);\n\t\treturn true;\n\t}\n\t\n\treturn false;\n}\n\nwebviewLib.getParentAnchorElement = function(element) {\n\tlet counter = 0;\n\twhile (true) {\n\n\t\tif (counter++ >= 10000) {\n\t\t\tconsole.warn('been looping for too long - exiting')\n\t\t\treturn null;\n\t\t}\n\n\t\tif (!element) return null;\n\t\tif (element.nodeName === 'A') return element;\n\t\telement = element.parentElement;\n\t}\n}\n\nwebviewLib.initialize = function(options) {\n\twebviewLib.options_ = options;\n\n\t// alert('iii');\n\n\tdocument.addEventListener('DOMContentLoaded', function(event) {\n\talert('loaded');\n\twebviewLib.setupResourceManualDownload();\n});\n}\n\ndocument.addEventListener('click', function(event) {\n\tconst anchor = webviewLib.getParentAnchorElement(event.target);\n\tif (!anchor) return;\n\n\t// Prevent URLs added via <a> tags from being opened within the application itself\n\t// otherwise it would open the whole website within the WebView.\n\n\t// Note that we already handle some links in html_inline.js, however not all of them\n\t// go through this plugin, in particular links coming from third-party packages such\n\t// as Katex.\n\tif (!anchor.hasAttribute('data-from-md')) {\n\t\tif (webviewLib.handleInternalLink(event, anchor)) return;\n\n\t\tevent.preventDefault();\n\t\twebviewLib.options_.postMessage(anchor.getAttribute('href'));\n\t\treturn;\n\t}\n\n\t// If this is an internal link, jump to the anchor directly\n\tif (anchor.hasAttribute('data-from-md')) {\n\t\tif (webviewLib.handleInternalLink(event, anchor)) return;\n\t}\n});\n\n\n";
|
@ -1,5 +1,11 @@
|
||||
# Joplin terminal app changelog
|
||||
|
||||
## [cli-v1.0.136](https://github.com/laurent22/joplin/releases/tag/cli-v1.0.136) - 2019-05-19T10:19:22Z
|
||||
|
||||
- Improved: Put back "Fetched items" message during sync
|
||||
- Fixed: Handle missing resource blob when setting resource size
|
||||
- Fixed: Prevent app from trying to upload resource it has not downloaded yet
|
||||
|
||||
## [cli-v1.0.135](https://github.com/laurent22/joplin/releases/tag/cli-v1.0.135) - 2019-05-13T22:59:14Z
|
||||
|
||||
- New: Added option to disable creation of welcome items
|
||||
|
Loading…
Reference in New Issue
Block a user