Giter Site home page Giter Site logo

habitrpg / habitica-chrome Goto Github PK

View Code? Open in Web Editor NEW
107.0 29.0 47.0 1.22 MB

Chrome extension for HabitRPG. Uses 3rd party productivity website events to trigger point gain/loss.

Home Page: https://chrome.google.com/webstore/detail/habitrpg/pidkmpibnnnhneohdgjclfdjpijggmjj?hl=en-US

License: GNU General Public License v3.0

JavaScript 88.29% CSS 5.60% HTML 6.11%

habitica-chrome's Introduction

Habitica browser extensions

Packed files:

About the development

The main goal is keeping away the core code from the browser dependency, so it can use in multiple platform. But since every browser has an own extension structure it's not an easy task...

The tools which are help achive that holy goal:

  • small separated files
  • event based communication
  • build system which pack everything together

Development environment setup

The build system is the Grunt task runner. If you don't know definitely check it (life saver stuff:).

  • The first step is get the nodejs and install.
  • Secondly get the grunt-cli package npm install -g grunt-cli
  • And the final step is go to the root of the cloned folder and type npm install and it will download all necessary stuff

That's is. You are ready to build some awesome feature :)

Build system commands

All grunt command must be writen to the terminal (cmd on windows) in the root of the cloned directory.

  grunt # check all javascript file for syntax error

  grunt chrome # copy and merge all necessary file to the builds/chrome folder

  grunt test_core # run the unit test on the core

  grunt watch:core # continuous watch the core and test/core folders
                   # and run jslint and unit test on every save
               
  grunt watch:chrome # continuous watch the chrome dependency folders 
                     # and run the chrome command on every save

If these not enough for you check the grunt file it has some others and of course feel free to expand :)

habitica-chrome's People

Contributors

agnesnutter avatar belphemur avatar goldbattle avatar lefnire avatar meepthetendie avatar neveri avatar p4ul avatar paglias avatar rummik avatar stanlindsey avatar syntaxpickax avatar tjwds avatar zingbretsen 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  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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

habitica-chrome's Issues

Deducts HP even on Non-vice Websites

I was just visiting GitHub, Google, and such sites, but my HP was deducted. Also, the timing of deduction is rather late, as I get notified a few moments after I visit those sites.

Not getting credit on productive websites.

The extension still deducts points when I visit a vice website, but doesn't add them when I visit my productive websites.

Edit: I added another website to the beginning of the list and it's working now. No idea why, but it seems to be fixed.

Son of edit: aaaaaand it's back. I haven't changed any of my settings.

Lingering typo

When I'm on a vice website (in my case facebook.com) I don't get any messages until after a minute or so it'll say 'linguring on a vice website. Apart from the fact I don't get a deduction for visiting straight away I'd love it if you could fix that typo! Its 'lingering'. Taaaa :)
Screen shot 2013-01-30 at 3 10'.

Tie into Rescue Time?

RescueTime categorizes my productive vs non-productive sites and application. Is there a way to get that into HabitRPG?

Chome extention penalizes for working in Microsoft Word

Good site opened on half-screen, Word on the other half.

When clicking on Word to work in it, the popup "I'm watching you" appears, and will penalize for continued use or swapping between Chrome and Word.

Update: It also give "I'm watching you" popup when I minimize Chrome, and nothing else is open (wallpaper is visible).

Only count focused tabs

Hi,

I leave most of my "Good" tabs open all the time - e.g. my bank account, HabitRPG itself, my journal.

This artificially inflates my stats on the plugin, because I think it is counting the tabs all the time, even when I'm not actively using them.

So, I think the plugin should only count URLs when they are open AND in a selected, focused foreground tab.

Thanks,
-- Chad

Instant Death

I'm currently getting really high values in HP reduction in response from the API. Just received -438 HP which is insta-killing characters. Is this a problem with the extension or a result of API changes?

Still requires browser restart to display 'Browsing Productivity' habit

After installing, the extension did pop up and say when a point was added/deducted. However, it did not visibly add the new habit to HabitRPG. I checked several times over the course of a few hours. Reading through the closed issues, I noticed that a previous bug was the need for a browser restart, which I just did. Only now is the 'Browsing Productivity' habit in my list. Checking the graph, it has been keeping track of my points, just not displaying the habit.

Support for sub-folder URLs but not root.

I may be wrong as I've not tested this explicitly but I'd like to write support for sub-folder URLs.

E.g. to give positive score if you're on "google.com/reader/view/" but not to affect score on any other google.com site. I should get scored for catching up with RSS but not for googling. And similar items on other sites.

Edit: Reddit is a good example, you don't want to be docked for going to r/HabitRPG now do you!

(Lemme know if you've other examples of this as I can't think of many that aren't Google products and therefore this might not be an important feature/requirement)

Break timer

I recently noticed that the Chrome extension has a "Break" button, and I thought it would be helpful if this feature included a timer - you'd tell the extension how long you want your break to be, and after the time is up it would automatically go back to "tracking" mode. I've avoided using the break mode at all because I don't want to end up overusing it, and I think having this kind of feature would be helpful for that.

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Overflow of negative points in "Browsing productivity"

I know I am not a good guy about my browsing productivity, but to lose all my life (46points remaining) in less than 24 hours when I wasn't in front of my computer is very very strange !
More than 3,000,000 negative points to do... nothing !!!
Result : My character died, of course.
My reaction : I deleted this extension.

image

PS: English is not my natural language

jQuery errors on load

i know you said you were hitting jQuery inclusion issues, I'm still hitting some errors on load:

Uncaught ReferenceError: jQuery is not defined chrome-extension://pidkmpibnnnhneohdgjclfdjpijggmjj/scripts/options.js:1
Uncaught ReferenceError: jQuery is not defined chrome-extension://pidkmpibnnnhneohdgjclfdjpijggmjj/scripts/popup.js:13
Uncaught TypeError: undefined is not a function chrome-extension://pidkmpibnnnhneohdgjclfdjpijggmjj/scripts/bootstrap.min.js:7

+1 for mass closing Tabs

Too many tabs on our browser can clutter the productivity.

One shall gain points for killing those monsters away.

Work hours not working?

I set the work hours as 8 to 17, but I'm getting notifications & HP deducted even after 5pm (17:00).

Google Tasks integration?

Doesn't work. If you click on Google Tasks from the options menu in the chrome extension, it brings you to your gmail, and that's it. If there is a step I should be taking after that to complete the integration it is unclear.

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

No user found

I copied the userid and token from my account in https://habitrpg.com/ but when I'm inspecting _generated_background_page.html I get the following error:

{"err":"No user found."}

I re-checked multiple times and the userid and token are okay.

goodDomains typos in options.html

Just started using the program the other day, and I decided I'd test the chrome extension by messing around on Codecademy for a while with it enabled. However, after over an hour I still had nothing, so I went to check the configuration, and found a couple of typos in the default configuration. In options.html it lists "codeacadamy.com" and "khanacadamy.org", where the correct spelling of the websites are, respectively, codecademy.com and khanacademy.org.

Gain XP for certain sites

From a user:
I'm really enjoy habitrpg, and I have an idea for the chrome extension. Would it be possible to add a feature where your awarded with exp for time spent on certain websites?

Chrome extension, taking hits while Work Mode is OFF

I've set my chrome extension to only have work hours Mon-Fri, and I'm still taking hits for being on YouTube. When I click the extension icon I see "Work Mode: OFF". As a result, the hits keep getting worse and worse and now I've died a few times over. I actually find this pretty funny, and I'm not really upset since the initial death was my own fault, but it is technically wasting all of the productive work points I'm plugging in.

For now I've just adjusted my sites list to ignore the occasional youtube video, but is there a better way to go about this? Do I need to have work hours be something other than 0 to 24 as well?

[Edit: Grammar]

Timer needs a tab check

Im posting this here as my code has been merged so its public.

Currently the timer will score without checking if a tab exists so if the user is on the site for less than 5 minutes they will be scored on the 5 min mark anyway.

Needs a chrome.tabs.get check on the 5min mark in the timer.

Requires restart on first run

POST to the server requires a restart after entering UID & APIToken as otherwise habitrpgUrl becomes null, breaking post. Annoying for first time users.

user needs to change between always and days & hours

email from a user:

There are bugs in the chrome extension. I am telling you directly because I don't want to keep getting email updates from github. I have to change between always and days & hours for the thing to start. After which it just starts giving me crazy experience till I switch it from 25minutes to 5 and back again. After that it works.

Chrome Extension Ideas

From @neohuman @ HabitRPG/habitica#370

Is there any way that the chrome Extension could have more controls? By that I mean on certain days I can visit some sites and be productive but on others I can't. Plus can you make it so visiting a certain website is a plus in its own little habits. Instead of just browsing productivity?

Extension gets stuck on "Inactive" after leaving the tavern.

I set my account to "rest in the inn" for a few days, and after I checked out the sitewatcher state was still set to "inactive" and didn't give or deduct any points. It only started working again after I removed the extension and re-installed it.

customizeable time

add to options.html customizeable setTimeout, i'm winning too hard! :D

HP Deduction Time Intervals

Allow the ability to change vice website HP deduction time intervals. It seems to be currently set at a default of 5 minutes I believe. It would be awesome to be able to customize that time so I can make it every 15 or 30 minutes.

Also what is the rate of cumulative HP loss? 25%? Whatever that default is set to would be amazing to customize that value as well. In percentage or just be able to set 1-5 dmg per time interval.

One last thing. Let's say i'm deducted HP from a vice website, if I then, within the first time interval, open a second vice website. Will I be deducted once per site or once per time interval. Thanks!

Deleting 'Asana' habit once loses Asana integration forever

When I first installed the - very cool - HabitRPG Chrome extension it automatically created a habit for my Asana task-completion. However I then deleted this habit, and it's not reappearing when I disable and reenable Asana integration in the extension's preferences, or even when I uninstall and reinstall the extension. This means I've lost Asana integration forever. How can I fix this, or is this a bug in the extension that needs fixing?

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Doesn't seem to be triggering

@SlappyBag when you get the chance, install the newly-deployed chrome store version. I can't get it to trigger for bad sites on my account. Shows in the URL bar, but no notification / HP loss

repository moved

Hey @SlappyBag & @NeverI , I moved the repo to /HabitRPG/habitrpg-chrome for consistency. Don't worry, it maintains all the info (issues, follows, forks, etc) so the only thing to worry about is external sites linking here, which I'll update where I know about.

Chrome Extension Feature Suggestion: Adjustable work hours for each day.

I'm a student and don't have a regular schedule each day. Some days I start classes at 8:30AM, and others not until noon. It would be great if you could adjust the set work hours for each day to account for varying, non-traditional schedules. As it stands right now, I have my work hours set from 8AM-3PM. On days I'm don't start class until noon, I will be penalized for general surfing before class at noon.

Empty Line in settings menu triggers everything

If there is an empty line in the vice or productive sites input then the viceDomains/goodDomains array returns "" - this triggers on all websites.

Needs a check to remove blank lines. (This is easy though so its all good)

Downtime/ non-tracking times?

Is there a way to prevent losing HP during breaks from work? For example if I'd done all my tasks for the day is there anything I can do to not penalise my evening reddit browsing? I assume the only way is to disable it in settings?

I have an idea for the Chrome browser extension!

This idea comes from another app I've tried, DeskTime. https://desktime.com It records the applications/websites you use and puts them on your dashboard, so you can mark them (with the click of a button) as productive or unproductive later. (The default is neutral.)

I quite like it because then I'm not required to remember exactly which websites I visit, and I can adjust things retroactively.

Of course, the HabitRPG extension would just record websites.

I realize this suggestion may be a concern to other users because maybe they'd feel that is too intrusive privacy-wise.

What do you think?

jg iufnomiu

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

From @jaysoncopes: Chrome Extension - Work Hours Bug

From @jaysoncopes:

This bug is simple but actually throwing me off - it seems that the work hours are coded for a certain timezone, which appears to be an hour later than Central timezone. (USA, of course.) Just wondering if this is supposed to be happening.

My example is that it is 4:38 PM right now (according to my computer o.O) and I have my work hours set from 9 - 16. Shouldn't it be off right now? It turns off if I set it from 9 - 15, but 9 - 16 at 4:38 sets it on.

Google Tasks detracting hp error

when changing the name of a task, editing the notes field, or changing the due date in an existing google task, my hp is marked down. this shouldn't happen. I get a popup notification saying :

I thought this was done :( 0hp.

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

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.