GithubHelp home page GithubHelp logo

mskian / gotify-push Goto Github PK

View Code? Open in Web Editor NEW
37.0 7.0 11.0 377 KB

Chrome Extension for Send Push Notification ๐Ÿ”” to gotify/server โ˜

Home Page: https://chrome.google.com/webstore/detail/gotify-push/cbegkpikakpajcaoblfkeindhhikpfmd

License: MIT License

JavaScript 68.40% HTML 12.48% CSS 19.12%
gotify html css fetch push-notifications chrome-extension javascript spectre spectre-css notification

gotify-push's Introduction

Gotify push

Gotify Google Chrome Extension

Chrome Extension for Send Push Notification to gotify/server ๐Ÿ””

Gotify Push

๐Ÿ–ฅ System Font
๐Ÿ’… Spectre.css Framework
๐Ÿ’ฏ Light Weight and Optimized
โณ Fetch API
๐Ÿฆบ Supports on all Chromium Based web browsers

Requirments

  • Gotify API
  • Latest Chromium Version for manifest v3 Support
  • Allow CORS Headers to Access and Call Gotify API

Service Worker

Chrome manifest v3 using Service Worker here we use it to create Chrome contextMenus to sending image,link and selected text to Gotify Server.

Installation

  • Download or Clone this Github Respo
  • Open the Extension Management Page - chrome://extensions
  • Enable Developer Mode by clicking the toggle switch next to Developer mode.
  • Click the LOAD UNPACKED button and select the unzipped extension directory

Usage

  • you can Find the Plugin Option page on Chrome toolbar Right side of the Address bar
  • Click Gotify Setup Button and Enter your Gotify APP API URL and Save it
  • That's all Successfully Setup Gotify Push Extension on your Brower

Allow CORS

You must configure your server CORS allow this extension to Send push notification from this Extension

  • Open config.yml File and Update this Setup
server:
  cors:
    alloworigins:
        - "chrome-extension://cbegkpikakpajcaoblfkeindhhikpfmd"
    allowmethods:
        - "GET"
        - "POST"
    allowheaders:
        - "Authorization"
        - "content-type"
  stream:
    allowedorigins: # allowed origins for websocket connections (same origin is always allowed, default only same origin)
      - "cbegkpikakpajcaoblfkeindhhikpfmd"

Features

  • Send Custom Push Notification
  • Send Current page INFO
  • Send Image URL
  • Send Link
  • Send Selected Text

Gotify push

Gotify push

Gotify push

Gotify push

LICENSE

MIT

gotify-push's People

Contributors

harishphk avatar mcnaveen avatar mskian avatar vivekascoder avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

gotify-push's Issues

Can you show a sample config for docker env variables instead of config.yml?

I tried translating your instructions:

server:
  cors:
    alloworigins:
        - "chrome-extension://cbegkpikakpajcaoblfkeindhhikpfmd"
    allowmethods:
        - "GET"
        - "POST"
    allowheaders:
        - "Authorization"
        - "content-type"
  stream:
    allowedorigins: # allowed origins for websocket connections (same origin is always allowed, default only same origin)
      - "cbegkpikakpajcaoblfkeindhhikpfmd"

like this:

    environment:
      - GOTIFY_SERVER_CORS_ALLOWORIGINS="- \"chrome-extension://cbegkpikakpajcaoblfkeindhhikpfmd\""
      - GOTIFY_SERVER_CORS_ALLOWMETHODS="- \"GET\"\n- \"POST\""
      - GOTIFY_SERVER_CORS_ALLOWHEADERS="- \"Authorization\"\n- \"content-type\""
      - GOTIFY_SERVER_STREAM_ALLOWEDORIGINS="cbegkpikakpajcaoblfkeindhhikpfmd"

but now gotify stops with an error when starting:

docker-compose  logs -f
Attaching to gotify
gotify    | Starting Gotify version 2.0.23@2021-06-19-10:08:25
gotify    | panic: yaml: unmarshal errors:
gotify    |   line 1: cannot unmarshal !!str `cbegkpi...` into []string
gotify    |
gotify    | goroutine 1 [running]:
gotify    | github.com/gotify/server/v2/config.Get(0xc0000a2150)
gotify    |     /proj/config/config.go:68 +0x2d7
gotify    | main.main()
gotify    |     /proj/app.go:34 +0x252
gotify exited with code 2

any help please?

push to firefox store

Hi
Would you agree to also push your extension to the firefox store ?

I tested it and it just works as is on firefox.

The only tweak needed is in debug mode, the storage.sync calls fail because an extension id is not present.

Steps I followed :

  • clone repo
  • to allow extension installation in debug mode add the following to the manifest :
"browser_specific_settings": {
        "gecko": {
          "id": "[email protected]",
          "strict_min_version": "42.0"
        }
      }
  • in about:debugging#/runtime/this-firefox select "load a temporary extension", pick either the manifest file or zip containing all the source files
  • test the extension : it works flawlessly

[question]: multi user or multi device

Hello

I enjoyed you extension a lot. It is simple and it works as basic functionality.
I wonder if you can make the extension

  • for multi device: as example send from my laptop only to my phone, not on my tablet. I think I can create a new app in gotify webui and I want to sent a message only to specific app.
    or
  • for multi user: allow registration in extension to many users and I will register each device with its own user (phone one user, tablet second user, my friend another user) I want to be able to send different messages to each device.

Thank you
Gabriel

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.