Browse Source

Fixed up readme, moved all TODOs into readme

Chris Konstad 3 years ago
parent
commit
458baab51a
3 changed files with 4 additions and 11 deletions
  1. 4 0
      README.md
  2. 0 10
      background.js
  3. 0 1
      options.js

+ 4 - 0
README.md

@ -3,6 +3,7 @@
3 3
* [x] store subreddits for suggesting later
4 4
* [x] used stored subreddits to help autocomplete
5 5
* [ ] add fuzzy matching
6
* [ ] better suggestion ordering (popularity/closeness)
6 7
* [x] don't save a subreddit if it doesn't exist (URL is a search page)
7 8
* [x] don't save data when in incognito, per google guidelines
8 9
* [x] be able to remove select subreddits from list
@ -11,3 +12,6 @@
11 12
* [ ] reset the counts on a schedule (weekly?), but keep the subreddit listed
12 13
      so that new subreddits can surpass old subreddits if they're visited a lot.
13 14
      Or do exponentially weighted moving average stuff instead.
15
* [ ] remove alerts for production
16
* [ ] make sure filter doesn't filter out perfect matches
17
* [ ] ask for user confirmation in options before deleting all subreddits

+ 0 - 10
background.js

@ -1,5 +1,4 @@
1 1
// Chris Konstad, 2016
2
// TODO remove alerts for production?
3 2

													
4 3
// important variables
5 4
var storage = chrome.storage.sync;
@ -38,16 +37,12 @@ function saveSubreddit(subreddit) {
38 37
}
39 38

													
40 39
function loadData() {
41
  console.log("loading data");
42 40
  storage.get(null, function(items) {
43 41
    subs = [];
44 42
    for(var key in items) {
45 43
        counts = items;
46 44
        subs.push(key);
47 45
    }
48
    //console.log(JSON.stringify(items));
49
    //console.log(JSON.stringify(subs));
50
    //console.log(JSON.stringify(counts));
51 46
  });
52 47
}
53 48

													
@ -59,7 +54,6 @@ chrome.omnibox.onInputStarted.addListener(
59 54
);
60 55

													
61 56
// Filter a list using substrings
62
// TODO make sure it matches perfect matches
63 57
function filterSubreddits(text, subs) {
64 58
  var ret = [];
65 59
  subs.forEach(function(sub) {
@ -75,10 +69,6 @@ function filterSubreddits(text, subs) {
75 69
chrome.omnibox.onInputChanged.addListener(
76 70
  function(text, suggest) {
77 71
    console.log('inputChanged: "' + text + '"');
78
    // TODO add smart suggestions
79
    // TODO match fuzzy substrings
80
    // TODO sort by closeness
81

													
82 72
    // Get visited subreddits that contain the text as a substring
83 73
    var subsToSuggest = filterSubreddits(text, subs);
84 74

													

+ 0 - 1
options.js

@ -1,5 +1,4 @@
1 1
function clear_subreddits() {
2
  // TODO ask for user confirmation, but confirm doesn't work on Options2
3 2
  chrome.storage.sync.clear(function() { loadData(); });
4 3
}
5 4