Releases: Cipher-Coder/chromeExtension
Easier onboarding & Graph Cache
- Made it easier to access settings on first run. Reference Issue #1
- Added a Cache for the Github Graph - Too many requests are being sent. Sometimes a single person is aquiring a new tab > 20 times an hour. Since my self-hosted proxy is hosted on GCP the cost is increasing exponentially. Right now, it is set to cache the data for one hour. However, if this does not bring the cost back down to a managable range I will have to increase the time.
- Fixed inject.js for Twitter portion. After Twitter UI update the CSS classes were not the same, so it was not triggering the the insertion of the DEV. Now it works when Twitter UI is set to dark mode.
- Added link to changelog from the icon popup.
devTabs.zip
DEV articles && Image error fix
In this release I fixed the Dev.to articles from becoming stale. It seems as if the list of articles that shows in the extension is not the latest, or the top listed on their site. So I looked at their new API documentation, and it seems I can just change the API call and append 'top' to the end, and it seems to be working better in testing.
Also in this release I changed around the buttons on the settings page, so they match the design a bit better and are just generally nicer.
Fixed the constant error in the console when the Dev API returned an article without a cover_image, it showed a null object error. I added an if
statement to take care of that. Now it will only load if
there is a cover_image : display none.
I also fixed some misspellings, and I made the '+' icon to add a bookmark switch to a '-' when clicked to signal to user to click that button again to get back to the original state.
Basic refactoring, fixed some commas that should have been semi-colons. Changed some var into let.
Changed the font color of the save button on the place where you add a single bookmark.
Added some JSDoc comments.
Fixed chrome.storage.removeItem to just chrome.storage.remove so the 'Delete Bookmarks' button actually works now.
Updated DOMpurify lib and un-minified it for Firefox - This also took care of the warning in the console about sourcemaps.
Fixed Dev.to article by-line - problem was: if there was no twitter_username returned with the article object, the entire article was omitted. I fixed it so if there is no twitter_username, it will now display and link to the Dev.to username.
Cleaned up the sanitizing of bookmarks on initial input. Marked.js dropped support for sanitizing input in their library. So I was able to just use the DOMpurify library I was using in other places to sanitize on bookmark entry.
Fixed Object output when adding single bookmark
After using the extension on the new Chrome, I tried to add a single bookmark from the Dev Tabs homepage. In doing so I got [object, Object]
as output instead of the expected string pushed to the end of the bookmarks array. After looking at the DOMpurify issues I realized the sanitized output returns TrustedHTML-Object instead of a string. So I had to convert the sanitized output toString()
prior to appending it to the array. Now everything works as expected.
Rewrite of github-calendar.js
This release is centered around a complete re-write of the github-calendar.js
file. I changed from hitting GitHub in general to https://github.com/users/username/contributions
API and instead of parsing the entire profile and getting just the contribution info this will in turn decrease the downloaded file size and increase loading time for the calendar since it is just the contribution info being loaded. Also this lib had a total rewrite from its maintainer. I also made sure my proxy was coded into the lib so it did not depend on someone elses free tier from App Engine.
Fixed proxy for GitHub graph call
The URL Proxy I was using to hit GitHub and get commit graph details kept going over its limit and interrupting my service. So I created my own Proxy through Google App Engine and am now hitting that and all is working agian.
Fixed DEV Box
After the last update to fix the DEV box, I realized if you were to navigate to another page on Twitter, the DEV portion would show up in your main feed. It had to do with the className I was referencing to inject the DEV node into the DOM.
I fixed the reference classes selected to inject after and all seems well now.
I also added a little more CSS styling.
Fixed Twitter UI
Fixed Twitter portion of extension after Twitter's UI update
Changed all CSS classes
- Adjusted all function calls
- Changed all class names to match Twitter's new ones
- Changed Template literals so everything will work
Still some work to be done on styling - Just wanted to at least get it working
Sanitize user input
Needed to sanitize user input for all the bookmarks added.
- DOMPurify lib was added and all input is run through that. Bookmarks entered initially as well as any input from the user for bookmarks entered one at a time from the index page.
Ran autoprefixer on all CSS files
Added option to change the Unit of Measure on weather display
Had a request to add in functionality to change the weather information display to Metric
Added option in the Weather options to toggle between Imperial Units for the US and Metric Units for other countries.
Now there is a toggle switch before getting weather location. The default is Imperial but you can toggle it to Metric so you can have the Wind Speed displayed in KPH instead of MPH and the Temperature will be in Celsius.
This selection is stored in 'chrome.storage.local' with all the other options and is just appended onto the end of the API call to Open Weather Map then it will return the info in that unit of measure. Then the browser will check that selection again prior to display and show either MPH of KPH after wind speed.
Bookmark Warning Smaller Screens
Shrunk the margin on Options page to try and keep the Warning about deleting bookmarks from bleeding into the donate portion.
On smaller screens the warning under Delete Bookmarks was mixed into the paragraph on donating.
I shrunk the margin as well as shortened the message to warn users about deleting the bookmarks.
** This only effected small screens
Style Updates
Minor style updates - changed article description and repo description to italic and adjusted size on both. Also increased letter spacing on article desc.
Added function to clear the input for bookmarks after you hit the save button.
Bumped padding on the calendar boxes