-# = link_to (image_tag "telegram-logo.png", height: 32, width: 32), "https://t.me/+IEp-tAetjYozYWM5"
-# - @tokens = Token.all
-# .footer-tokens
  %h3 Tokens
  - @footer_tokens.each do |token|
    = link_to token.name, token
.global-doodads
  %h1 Global Doodads
  = render collection: @global_doodads, partial: "doodads/doodad"

:javascript
  function destroyDoodad(doodad_id) {
    return fetch("/doodads/" + doodad_id, {
              method: 'DELETE',
              headers: {
              "Content-Type": "application/json",
              "Accept": "application/json"
              }
              })
      .then(response => response)
  };
  // var s2 = Swiped.init({     query: '.bar li',     list: true,     left: 200,     right: 200 });
  var global_doodad_swiped = Swiped.init({ query: '.global-doodads .doodad',
                list: true,
                left: 200,
                right: 200,
                onOpen: function() {
                        var doodad_id = this.elem.className.split("-")[1];
                        destroyDoodad(doodad_id)
                          .then(results => console.log(results));
                        this.destroy(true)
                    }
                });
