ozencb / tilde-enhanced

A minimal startpage for your browser
https://ozencb.github.io/tilde-enhanced/
The Unlicense
308 stars 92 forks source link

Publishing as an extension #4

Open talentlessguy opened 4 years ago

talentlessguy commented 4 years ago

It would be nice if Tilde could be installed as a Chrome / FF extension.

Only manifest.json is needed

ozencb commented 4 years ago

Yes, I have been thinking about publishing it as a browser extension but few problems arise. I am yet to implement a config panel that lets you manage the page without diving into source code, so people who install it as an extension can do so. Otherwise, I believe, they would need to extract the source code from extension package, change the colors/bookmarks etc. and pack it again, which makes everything a lot worse 😅 Also, I tried packing Tilde as an extension with a manifest file, and it did work fine on debugging mode but I could not install it as a normal extension. I did not look into it after that but I think the file has to be signed to be installed, am I correct?

talentlessguy commented 4 years ago

@Ozencb yes it has but at least we will be closer to publishing it.

Also I advice to use a bundler for assets, like Parcel to compress all the assets into only three files (js, html and css files).

Then manifest.json will be much easier to get it working and development will be easier

ozencb commented 4 years ago

@talentlessguy Yes, I want to make the project a bit more managable eventually and use either Webpack or Parcel. It is very cluttered and hard to work on as is.

Ah, also another point for browser extensions is, I think, requesting search suggestions from Duckduckgo or Google might be a problem with an extension because I remember getting security policy errors due to callback blocks to third-party addresses. I have to find a solution for that problem too, if it is possible.

Ghetreek commented 3 years ago

Found a solution to the problem with requesting search suggestions from Duckduckgo. Here is an example of a manifest that worked for me in firefox

{
    "manifest_version": 2,
    "name": "Tilde Enhanced",
    "version": "1.0.0",
    "description": "A minimal startpage for your browser ",
    "developer": {
        "name": "Ozencb",
        "url": "https://github.com/Ozencb"
    },
    "content_security_policy": "script-src 'self' https://duckduckgo.com; object-src 'self'",
    "applications": {
        "gecko": {
            "id": "tilde-enhanced@ozencb",
            "strict_min_version": "57.0"
        }
    },
    "permissions": [
        "storage"
    ],
    "chrome_url_overrides" : {
        "newtab": "index.html"
    }
}