This is the repository for the JavaScript website part of the iOS shortcut CopyPaste Actions.
In the issues section all issues regarding the shortcut are handled, not only the ones regarding the website.
If you want to help me improve the shortcut, you can help me fix any open issue or translate it into a new language (or fix existing ones) by creating a pull request.
To develop locally you can use any Editor/IDE. I personally use Visual Studio Code, but any other editor that can handle Unix line feed characters on Windows (instead of the Windows default carrige return-line feed) is also fine.
npm run install
npm run serve
Note: To see an update after changing any language file you need to refresh your browser. If this doesn't work, just restart this command.
npm run build:main
and the decompress "page"
npm run build:targz
npm run build
npm run generateLanguageFile
npm run test -- --all
On macOS you can easily debug a webpage on iOS with Safari on the Mac, but on Windows that is not possible. There are some workarounds like this one, but they are not guarnteed to work, so I added a simple script that sends all console messages to a local server.
- Make sure your Mac/PC and iOS device is in the same network.
- Open a console and type
npm run remoteConsoleServer
- Create a file
remoteConsoleUrl.local
in the root of this repo with the URL shown after startup of the previous step (no final line feed character!) - Start the webpack-dev-server with
npm run serve
- Use the website on your iOS device and all custom console messages are send to your Mac/PC
I've discovered that when using the History API, the browser will assume that the page wasn't opened by a script and therefore prevent closing it with window.close()
(see #1). To enable closing of the window, the History API therefore cannot be used. Because of this, vue-router is used in abstract mode and the navigation is written from ground up. For this to work I'm relying on some internal properties and functionalities and that in turn leads to the fixed version of vue-router. When you update it, check that:
- the methods
back
andforward
callthis.go(-1)
andthis.go(1)
respectively. I've only hooked intogo
to detect history navigation. If these calls are removed, also add the hook toback
andforward
(affects file src/router.js). - the history handler is mounted on
router.history
and has the propertiesstack
andindex
which contain the history items and the current position respectively. If this is changed in vue-router, it has to be adapted in the code, possibly also with a complete rewrite (search forrouter.history
in all files).