Notification Addon for Chrome > Invisionize.eu - IP.Board (IPB) News
Kanał Rss Kanał Rss
Kanał Atom Kanał Atom

Notification Addon for Chrome

wersja drukowalna wersja Microsoft Word wersja HTML

This addon was created by a staff member of my site, but because its needed a license to add files to the marketplace, its me that is creating it.

 

The reason for the creation of this extension was for users to be able to receive notifications in Chrome without the need to have the site open in a tab. It can also remember user to check back the site if it was forgotten.


Basically this extension will send a check for unread notifications, displaying a badge with the unread count. You can then click the badge and it will open a popup with the site where user can see the notifications. 

This boilerplate uses the awesome materializacss framework.

Steps to make it work:

  1. Look at the images in the folder, just change the icon and logo ones with your own with the dimensions specified in the name, so the icon 19 it will be the icon that appear in the browser and requires a 19px X 19px image, just do the same to the other images (some are no used but may be in future)
  2. Open the manifest.json file with any text editor, and change the name and description of your extension. Also change the "https://*example.com/*" with your site url. For example: "https://*invisionpower.com/*"
  3. Open the file popup.html, change the page title to your own, change the iframe url's that will be displayed and their names (forum, chat, notifications). In this boilerplate 3 iframes are inserted, The forum itself, a chat URL (in our board we have an external chat app where people login using our board credentials) and the  notification center, add your owns or remove, as it pleases you
  4. Next open the file undock.html, this file's almost the same as the previous one, except that the iframe doesn't have harcoded value, so it can be redimensioned at user will, just do the same you have done to the popup.
  5. The last file you need to change it's the background.js file, here in line 35 it's the url where the extensions polls the notifications. just change the "www.example.com"... part of it with your own forum url. Also in second line you have the variable pollTime that it's the default time that the extension checks for new notifications, the default value is 300000 miliseconds, 5 minutes, you can change it but be careful with it ;)  many users hammering your board could be a problem, so adapt it to your needs. Also within a functions you have comments where you can change the value if the popup is open, for instance (it will always check for new notifications on popup open and close).
    In line 59 you can change the time the notification will display when user opens popup, default is 10000, 10 seconds

if you want to adapt this extension to firefox, just check the firefox addon Foxified, as it will convert it without hassle, and although i'm not an firefox user, i've briefly tested it and everything seems fine

That's it, you now can add this extension to the Chrome Web Store so your members can add it to their browser. (There is a 5$ one time fee)

Also if you find better ways to achieve some of these functions, please share it with us here.

Best Regards

 

wto, 01 listopad 2016