johnjones4 / Standard-Notes-Clipper

A browser add-on (Firefox and Chrome) that allows you to clip web pages to your Standard Notes account.
MIT License
124 stars 13 forks source link

Possibility to configuring the URL of the SN sync server #14

Closed piccobit closed 4 years ago

piccobit commented 4 years ago

Thanks a lot for this great extension.

Since I'm running a self-hosted SN server, adding the possibility to change the URL of the server from the default one (sync.standardnotes.org) to that of my own server would make your extension even more usable.

johnjones4 commented 4 years ago

This will be in version 1.3.0. Can you test and verify for me please?

johnjones4 commented 4 years ago

https://github.com/johnjones4/Standard-Notes-Clipper/releases/tag/1.3.0

piccobit commented 4 years ago

Hi John,

Apologies for the late response.

The following error message shows up after the installation:

Unrecognized manifest key 'applications'.

{
  "manifest_version": 2,
  "name": "Standard Notes Clipper",
  "permissions": [
    "activeTab",
    "storage",
    "contextMenus",
    "https://sync.standardnotes.org/*"
  ],
  "icons": {
    "16": "icon16.png",
    "48": "icon48.png",
    "128": "icon128.png"
  },
  "background": {
    "scripts": [
      "background/background.js"
    ],
    "persistent": true
  },
  "content_security_policy": "script-src 'self' https://sync.standardnotes.org; object-src 'self'",
  "content_scripts": [
    {
      "matches": [
        "http://*/*",
        "https://*/*"
      ],
      "js": [
        "content/content.js"
      ]
    }
  ],
  "browser_action": {
    "default_title": "Clip to Standard Notes"
  },
  "web_accessible_resources": [
    "content/content.css"
  ],
  "options_ui": {
    "page": "settings/index.html",
    "open_in_tab": true
  },
  "applications": {
    "gecko": {
      "id": "snclipper@johnjonesfour.com"
    }
  },
  "description": "Clip content you find on the web and save it to your Standard Notes account",
  "version": "1.3.0"
}

As far as I remember, I also saw this error message the first time I had modified installed your extension. The strange thing is, that the extension after a reload started working at that time, but the new version just generates an empty note on my SN sync server.

Beside the URL of my self-hosted SN sync server, I also miss the possibility to change the SN sync server URL in the options menu of the extension.

piccobit commented 4 years ago

Mea culpa, I forgot to mention that I'm using Vivaldi as my preferred browser!

johnjones4 commented 4 years ago

Should be fixed now: https://github.com/johnjones4/Standard-Notes-Clipper/releases/tag/1.3.1

piccobit commented 4 years ago

Yes, it is fixed now, but what I'm still missing is the possibility to change the URL also later in the options menu of the extension.

johnjones4 commented 4 years ago

I considered that, but based on my understanding of how SN's login system works, you wouldn't be able to switch servers after signing in - you'd have to re-authenticate with the different server in order to communicate. Therefore, I think it makes sense only to have the field for the server URL at the login prompt. However, if there's a use case you can explain that needs the server URL to be edited after signing in, I'm happy to add it.

piccobit commented 4 years ago

I complete agree to you, just forgot that. Thanks for implementing this feature, keep up your great work!