Giter Site home page Giter Site logo

dideler / brocku-reddit-for-chrome Goto Github PK

View Code? Open in Web Editor NEW

This project forked from adamalbrecht/hacker-news-for-chrome

1.0 1.0 0.0 597 KB

A Google Chrome extension for brocku.reddit.com

Home Page: https://chrome.google.com/webstore/detail/nolkcagjanpkfmpjnljlkmdlificaapk

JavaScript 75.13% HTML 18.79% CSS 6.09%
chrome-extension reddit-client

brocku-reddit-for-chrome's People

Contributors

adamalbrecht avatar dideler avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

brocku-reddit-for-chrome's Issues

Notification pops up for old submissions

Steps to reproduce the problem:

  1. Have the notification option for the extension enabled.
  2. Remove a submission from the front page that the extension is already aware of (via deletion or downvotes).
  3. When you refresh or the extension auto-refreshes, it will send a notification saying a new submission was made.

Expected:
No notification because no new submission was made.

Actual:
The second top post is seen as a new submission because it now appears at the top of the front page, and the submission that the extension has stored as the top one is no longer the top one, so it assumes the new top one is a new submission.

Fix:
Instead of just looking at the top stored link, go through the list of all stored links to verify if the submission already exists in storage, rather than assuming it's a new submission.

Refresh timer does not work

Expected:
An auto refresh is supposed to happen every so often depending on the user-set interval. E.g. every 15 minutes.

Actual:
No auto refresh. Upon inspection, the lastRefresh item in localStorage is abnormally large, so the current time will always be less than the next update time and no update would happen.

The lastRefresh time is too large because the retry time (used when an update fails) is appended rather than added. This is because the '+' operator acts as concatenation since lastRefresh is returned as a string. To fix, simply parse it as a float before adding the retry time.

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.