Make Medium Readable Again https://makemediumreadable.com
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

27 regels
869 B

  1. // Saves options to chrome.storage
  2. function save_options() {
  3. var hideDickbar = document.getElementById('dickbar').checked;
  4. chrome.storage.sync.set({
  5. hideDickbar: hideDickbar
  6. }, function() {
  7. // Update status to let user know options were saved.
  8. var status = document.getElementById('status');
  9. status.textContent = 'Readability improved! (Settings saved.)';
  10. setTimeout(function() {
  11. status.textContent = '';
  12. }, 2500);
  13. });
  14. }
  15. // Restores select box and checkbox state using the preferences
  16. // stored in chrome.storage.
  17. function restore_options() {
  18. chrome.storage.sync.get({
  19. hideDickbar: false
  20. }, function(items) {
  21. document.getElementById('dickbar').checked = items.hideDickbar;
  22. });
  23. }
  24. document.addEventListener('DOMContentLoaded', restore_options);
  25. document.getElementById('save').addEventListener('click', save_options);