From 788e5eae4769733dcd05f4966563168bb6a99f72 Mon Sep 17 00:00:00 2001 From: Ryan Baumann Date: Tue, 7 Mar 2017 10:51:23 -0500 Subject: [PATCH] Don't memoize CTS text to localStorage (see ryanfb/cts-cite-driver#4) --- src/js/cts-cite-driver.coffee | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/js/cts-cite-driver.coffee b/src/js/cts-cite-driver.coffee index cbb6102..1e8a65a 100644 --- a/src/js/cts-cite-driver.coffee +++ b/src/js/cts-cite-driver.coffee @@ -81,15 +81,12 @@ set_cts_text = (urn, head, tlg) -> $(urn_selector).append(editor_link) add_translations(urn) -# sets passage from Fusion Tables result row and memoize to localStorage +# sets passage from Fusion Tables result row set_passage = (passage) -> urn = passage[0] head = passage[1] tlg = passage[2] - localStorage["#{urn}[head]"] = head - localStorage["#{urn}[tlg]"] = tlg - set_cts_text(urn, head, tlg) show_all = -> @@ -124,10 +121,7 @@ add_urn_li = (urn) -> urn_li = $('
  • ').attr('id',urn_to_id(urn[0])).text(urn[0]) $('#valid_urns').append urn_li - if localStorage["#{urn[0]}[head]"]? - set_cts_text(urn[0], localStorage["#{urn[0]}[head]"], localStorage["#{urn[0]}[tlg]"]) - else - set_passage(urn) + set_passage(urn) add_valid_urns = -> console.log('add_valid_urns')