Add a way to pause the background animation #220

I currently set href to "" because I don't currently know how to interface with session variables directly through html tags. "Basic View" and "Standard View" have different lengths, so the footer shifts when the button is pressed. The paused background state is different from the paused state when the user once again switches to the tab after a period of time, where the triangles are all orange and regular. The session variable can also be renamed and used elsewhere to perhaps make the page less reactive, for example in displaying search results, to reduce lag.
How do I find the locations of the errors in the code quickly?

Just to confirm, the following code can be kept in client/footer.coffee, correct?
Session.setDefault 'backgroundPaused', false

Thanks.


On Jun 27, 2014, at 5:09 PM, Tiantong Qin <tiantongqin@gmail.com> wrote:

> Never mind; grep with double quotes works; I’m not sure why it didn’t work the first time
> On Jun 27, 2014, at 5:03 PM, Tiantong Qin <tiantongqin@gmail.com> wrote:
> 
>> Should I do something like this? But it errors out, as I’m not sure if this is even a valid method, and “Start” and “Background” are recognized as attributes. How do I grep something with double quotes?
>> 
>> value="Session.get 'backgroundPaused' ? \"Start Background\" : \"Stop Background\”"
>> 
>> On Jun 27, 2014, at 4:00 PM, Mitar <notifications@github.com> wrote:
>> 
>>> In client/footer.coffee:
>>> 
>>> > \ No newline at end of file
>>> > +  'no-index-footer' if not Template.footer.indexFooter()
>>> > +
>>> > +Session.setDefault 'backgroundPaused', false
>>> > +
>>> > +Template.backgroundPauseButton.events
>>> > +  'click': (e, template) ->
>>> > +    Session.set 'backgroundPaused', not Session.get 'backgroundPaused'
>>> > +    return # Make sure CoffeeScript does not return anything
>>> > +
>>> > +Template.backgroundPauseButton.backgroundPauseButtonText = ->
>>> Please reply to separate comments separately, so that it is easier to follow.
>>> 
>>> What does put text into template not code mean? Should I change the Session.setDefault line to a template, move the Session.setDefault to another file, move it into some Deps.autorun method, or something else?
>>> 
>>> It means that you have a string "Pause Background" in the code. What you should do is return simply the value of backgroundPaused to the template, and then in the template with if condition there display the correct string. Learn about various commands you can use in the template. Have clean separation between controller logic and template logic.
>>> 
>>> —
>>> Reply to this email directly or view it on GitHub.
>>> 
>> 
>