Skip to content
An extension to save the scroll position of a webpage
JavaScript CSS HTML
Branch: master
Clone or download
Latest commit 1566ae3 Nov 3, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github Added pull request template Oct 3, 2019
.vscode strip query params from url before performing actions (#31) Oct 12, 2019
Roboto redesigned the popup sheet (#36) Oct 10, 2019
images
utils SweetAlert and some Design Changes. (#69) Nov 3, 2019
.all-contributorsrc docs: add roseg43 as a contributor (#70) Nov 3, 2019
CODE_OF_CONDUCT.md Create CODE_OF_CONDUCT.md Oct 3, 2019
LICENSE 📄 Add license Oct 3, 2019
README.md docs: add roseg43 as a contributor (#70) Nov 3, 2019
background.js ♻️ Remove stray console logs Oct 31, 2019
delete.js strip query params from url before performing actions (#31) Oct 12, 2019
get.js strip query params from url before performing actions (#31) Oct 12, 2019
manifest.json 🔖 version 2.5 Nov 3, 2019
options.css 💄 Options page style and copy updates Nov 3, 2019
options.html SweetAlert and some Design Changes. (#69) Nov 3, 2019
options.js 💄 Options page style and copy updates Nov 3, 2019
popup.css 💄 Minor style upgrades Oct 10, 2019
popup.html 💄 Minor style upgrades Oct 10, 2019
popup.js Removed allFrames property from all calls to chrome.tabs.executeScrip… Nov 3, 2019
save.js

README.md

Scrroll In

All Contributors

Never forget where you left a page.

Scrroll In - An extension to save scroll position of any webpage | Product Hunt Embed Scrroll In - An extension to save scroll position of any webpage | Product Hunt Embed

Contribute to this project during hacktoberfest and get exclusive limited edition Devfolio schwag if your pull requests gets merged. Read more

Motivation

You must have been in a situation wherein you are reading a long article, but you don't have enough time to finish it, so you close the tab, and the next time you open the article again, you have no idea where you left it.

So this extension lets you save the scroll position of the webpage, so you can continue from exactly where you left.

I know there are a few extensions that already serve this purpose, but most of them either didn't work correctly or lacked the features that I needed, so I ended up creating my own.

How it works?

Under the hood, this extension uses the chrome localStorage API to store the scroll positions for different webpages. I avoided using sync storage due to its storage limitations (read more). This extension creates an object which stores the URL as keys and the scroll position as values.

The functions for adding or updating, reading and deleting are in the files save.js, get.js and delete.js respectively, which are executed as content scripts from popup.js whenever the respective button is clicked.

The background.js handles switching icon color whenever a tab is changed, or the URL is updated.

The popup sheet is also handled by popup.js by dynamically changing the UI following the availability of the URL in the localStorage object.

Development

To run the extension locally follow these steps:

  • Visit chrome://extensions and turn on developer mode.
  • Click on Load unpacked at the top left and select the extension root folder.
  • Now you can go ahead and modify popup.js or popup.html. Changes would directly be visible in the extension.
  • If you change something in background.js or manifest.json then you will need to reload the extension.

Contributing

All you need to know for contributing to this project is basic JavaScript, HTML, and CSS.

You can visit the issues page to find some relevant issues to contribute to or feel free to open a new issue for something that you think can be improved.

Also, if you have any doubts regarding any of the concepts or how to get started, feel free to drop me a message on Twitter or the Devfolio community Telegram group.

Contributors

Thanks goes to these wonderful people (emoji key):

Prateek Surana
Prateek Surana

💻 🎨 🖋 📖
Layla Hedges
Layla Hedges

💻
shikharsaxena98
shikharsaxena98

💻
Aditya Ketkar
Aditya Ketkar

🎨
DEBSUBHRA ROY
DEBSUBHRA ROY

🎨
Aashis kumar
Aashis kumar

💻
Rohit Kaushal
Rohit Kaushal

💻 🎨
Aditya Agarwal
Aditya Agarwal

💻
Mitch Moore
Mitch Moore

💻
Anuj Singh
Anuj Singh

💻
Gabe
Gabe

💻

This project follows the all-contributors specification. Contributions of any kind are welcome!

You can’t perform that action at this time.