Mini-TODO icon indicating copy to clipboard operation
Mini-TODO copied to clipboard

Added note sharing through Pastebin

Open theGeekyLad opened this issue 2 years ago • 3 comments

Pastebin Integration

Using the Pastebin API, notes can now be easily shared with a direct URL. Here's what it looks like:

mini-todo-pastebin

Setup

You'll need a Pastebin API Developer Key, which can be setup entirely for free on the Pastebin API website, for this to work. The key string can be pasted as the value of the pastebinDevKey constant on the first line of the index.js file.

Circumventing CORS

The server environment that hosts the website must support CORS for the Pastebin API to work or, alternatively, Google Chrome (and similarly other browsers) can be launched with the --disable-web-security flag as follows:

google-chrome --disable-web-security --user-data-dir=0 (on Linux)

Where the '0' at the end can either be left as is, or be made to point to the data directory for another user.

theGeekyLad avatar Oct 31 '22 22:10 theGeekyLad

I've updated the branch and merged all commits. Please let me know if it's alright.

theGeekyLad avatar Nov 05 '22 18:11 theGeekyLad

@theGeekyLad I think the share functionality isn't working can u please check again.

Zack-Dx avatar Nov 06 '22 03:11 Zack-Dx

@Zack-Dx the share functionality only works in a deployed environment as the API calls need to go from an https-based site to the Pastebin API without which we get the CORS error.

Momentarily, for testing, you could launch Chrome with the --disable-web-security flag as follows, to test the functionality: google-chrome --disable-web-security --user-data-dir=0

theGeekyLad avatar Nov 09 '22 07:11 theGeekyLad