kerrick / mostly-harmless Goto Github PK
View Code? Open in Web Editor NEWA reddit extension for Google Chrome
Home Page: http://kerrick.github.com/Mostly-Harmless/
License: Other
A reddit extension for Google Chrome
Home Page: http://kerrick.github.com/Mostly-Harmless/
License: Other
I've been using the extension for a few days but have not been receiving notifications when I receive a message on reddit.
I've tried:
Anything I should try next?
Tabbing between fields in the submit form
Implement the ability to post a link in a different subreddit if it has already been submitted.
This happens with just about every site I go to, HTTPS or not. I have reinstalled to no avail. Same thing happens in incognito mode.
Not sure what else to give you, sorry.
Thanks.
I don't know why it would be: but i do know one thing - on more than one occasion, i'd have been messing on the computer in the morning for an hour or so (no orangered notifications), then after a bit, say i want to watch something on youtube, i may have to restart chrome (lately it's been audio driver issues [ubuntu] which force me to logout/login till i find a better solution) and when chrome starts back up - i'm hit with an orangered notification.
Perhaps a right-click menu option to manually recheck orangereds would be in order ? (if that's possible...)
When you submit a URL as a post and the request is completed successfully, you get a link to view your post. However, when you submit a comment on a post and the request is completed successfully, the form simply disables. Instead, it should also show a the permalink to the comment.
More detailed error messages (right now if submit a post with a title that's too long I just get "undefined" as an error message).
I've used this feature successfully about half a dozen times, but for most of the last year, it just tells me there was an API error while submitting and my submission history confirms that nothing completed the submission process. This has occurred with more than a dozen submissions from different sources.
Currently, Mostly Harmless clears the cache every time the browser is restarted. Unfortunately, if a user leaves the browser open for a long time and loads huge number of pages, the ~5 MB quota Google Chrome gives each domain (extension) for localStorage
can be exceeded.
While rare, this is not handled gracefully; An uncaught error is thrown: QUOTA_EXCEEDED_ERR: DOM Exception 22
on background.html
, and Mostly Harmless's browser action icon never gets its text, popup, or tooltip customized, even if the API call is successful. Instead, it appears to be loading.
A quick fix would be to move a try
/catch
block around the caching functions. The extension could at least show an error instead of appearing to load until the browser is restarted.
A better fix would be to run a "cron job" at the interval specified in settings.cacheTime
, and clear the cache of all data that is both older than the cache time, and not relevant to a currently opened tab. It would also be possible to add a Clear Cache button to the preferences under Performance > Cache Time.
That way, once the popup is closed the browser icon will change to its default state. When the user clicks it again, RedditAPI.getInfo()
will be called. Ideally, this manual interaction will take long enough that the reddit API will send information about the new post.
I thought this was happening, but for some reason when I click on the default state icon, it gives me a submission form again. Either the cache was not cleared, or the reddit API had not yet recognized the submission. Further investigation is needed.
Blogspot automatically redirects to a localized version of the website [1], e.g. in France http://example.blogspot.com will redirect to http://example.blogspot.fr [2]. When Mostly Harmless then searches for the blog post on reddit, it reports zero previous submissions of the .fr URL, even though there have been submissions of the .com URL.
I suggest making a special case for Blogspot and, when viewing http://something.blogspot.fr/something, automatically search for submissions of http://something.blogspot.com/something to reddit as well.
[2] This is stupid 'cause cool URIs don't change.
After clicking a vote icon, hide, or report, the state may not appear to change unless you move your mouse over the vote icons (for voting) or the post (for hiding/reporting). This is a known bug in Google Chrome that was fixed upstream in Webkit. If you want this to be fixed, please star the issue in the Chrome bug tracker.
I really need to implement privacy controls. That way, users can exclude certain pages from being looked up by Mostly Harmless. The user will get two textareas: one for domains, and one for regular expressions. If a page is on a listed domain, or the URL matches a listed regex pattern, Mostly Harmless will be deactivated for that page.
secure.ingdirect.com
chaseonline.chase.com
online.wellsfargo.com
chrome://.*
chrome-extension://.*
view-source://.*
ftp://.*
https?://www.reddit.com/r/(\w|\+)+/?$
https?://www.reddit.com/?$
https?://www\.google\.com/search.*
https?://search\.yahoo\.com/search.*
https?://www\.bing\.com/search.*
A popular choices section that's based on submission history through Mostly Harmless. At the moment it seems random.
For example, when viewing a video on youtube, you can be viewing the https version for those that have extensions like "HTTPS Everywhere" (which seems like a lot of reddit users have) as well as the shortened versions (youtu.be/whatever) and whatever tags where added (youtube.com/whatever+featured?) or something like that is also very common. It would be nice if all of these were checked somehow, so you could tell if it had posted before not only with whatever version of the URL you are using.
if chrome is minimized and an orangered indicator is received, and clicked on - the URL is navigated to correctly, but is there a way to restore the window's visibility ? clearly the user wants to.
For example, http://www.reddit.com/api/info.json
is taking ~30 seconds to load tonight, and that's making Mostly Harmless pretty much unusable. I need to have a failsafe that gracefully handles the absence or poor performance of the Reddit API.
Hello.
I noticed that Mostly Harmless doesn't handle the 7 minutes time limit, for example when you post on reddit a link you have to wait 7 minutes between the next post. Mostly Harmless doesn't like it. You post is not created and Mostly Harmless redirects you to a corrupted link.
It would be nice too if Mostly Harmless could show a warning about the time to let the user know.
Thank you.
Cheers.
I got most of the extension ready for i18n, but I need to do the same for fancy-settings.
I'll need to implement the link in the Popup.createListHTML()
function. When clicked, it should invoke Popup.createSubmitForm()
.
I'll also need to detect whether the URL was already submitted to the chosen subreddit. First I'll check the cached data, and use that. If that passes and the URL is submitted, but reddit responds that the link was already submitted to that subreddit, I'll also need to handle that. (That should only pop up if the link was submitted between the time the data was fetched from the API and cached, and the time of the attempted submission.)
The Chrome extension @ https://chrome.google.com/webstore/detail/mostly-harmless/glfepofdcehcfjcibmdaajdhioiigkmh on Chrome Stable (Version 44.0.2403.157 m) and I imagine other versions of Chrome has been giving the following errors on submitting, upvoting and downvoting.
There was an API error. HTTP Status: 0. Click to try again.
For what it's worth I installed Chrome on clean OS in a VM, the extension and the same error happened.
Recently extension has started stalling before displaying the 'click to see submitted link' link. If I check afterwards, the link has still gone through though.
I've tried uninstalling and reinstalling the extension, but it didn't help. I'm currently using 18.0.1025.162 m
I didn't think of this while writing v1, because if a link has already been submitted as of the time RedditAPI.getInfo()
is called Mostly Harmless doesn't let you submit it, However, I've been trying to break Mostly Harmless from every avenue to make it stronger, and I discovered that if you open a URL and Mostly Harmless gives you a submit form, then you submit the link outside of Mostly Harmless to a subreddit, and then you submit the link via Mostly Harmless to the same subreddit, there is an issue.
Mostly Harmless thinks you successfully submitted the link, and when you click to view your post, it redirects to chrome-extension://BIGLONGEXTENSIONIDHERE//html/that%20link%20has%20already%20been%20submitted
. It should be a fairly simple test to see if the URL matches that, and if so throw an error or give a warning.
I need to implement a submission form for pages that have not been submitted to reddit.
It seems that when the user has "Wait for click" activated, and then clicks the browser action to load info about the page, dozens of HTTP requests are sent one after another to http://www.reddit.com/api/info.json
until the first one response. I'm not sure what's causing this, but it needs to be fixed ASAP, as this is a MAJOR problem.
Ability to expand fields
The extension vanished with the latest chrome update, trying to reinstall gives me this:
There was a problem with the download. Please contact the developer or try again later.
Hide details
Invalid manifest
Also, if you upload the crx to https://www.extensiontest.com/ it reports use of a deprecated api in chrome. Maybe that's what breaks it?
When you vote a post up or down, the displayed score stays the same rather than incrementing or decrementing by one. The reddit website does this, so should Mostly Harmless.
Getting this error whenever I try to submit a page.
"There was an API error. HTTP Status: 0. Click to try again."
Not sure how this would be categorized - but i think some sort of "What you're looking at is totally inapplicable to this extension" functionality, similar to the '+' and '#' indicators. In particular, when i'm on Gmail or my google docs whatnot, it still shows that one or more have submitted this page to reddit. Well, clearly not, AND, there's no way or reason to do so.
Sorry if this isn't descriptive enough... Honestly though, it's the only thing that sticks out to me so far.
Right now the subreddit box is static, which works if you know the subreddit name you want to submit to. However, implementing a typeahead dropdown would be nice, because it would act more like the form at http://www.reddit.com/submit does.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.