From 1b6fc39095792f73bfeef4f08a2b3bd110d054da Mon Sep 17 00:00:00 2001 From: Demian Ginther Date: Wed, 14 Nov 2018 17:07:58 -0700 Subject: [PATCH] refactor --- PRsRequested.widget/index.coffee | 72 -------------------------------- 1 file changed, 72 deletions(-) delete mode 100644 PRsRequested.widget/index.coffee diff --git a/PRsRequested.widget/index.coffee b/PRsRequested.widget/index.coffee deleted file mode 100644 index f92b5e5..0000000 --- a/PRsRequested.widget/index.coffee +++ /dev/null @@ -1,72 +0,0 @@ -command: "bash ./PRsRequested.widget/helper.sh" - -refreshFrequency: 5000, - -render: (output) -> - """ -
-
Pull Requests To Review
-
#{output}
-
- - """ - -style: """ - left: 20px - top: 20px - color: #fff - - // Statistics text settings - color #fff - font-family Helvetica Neue - background rgba(#444, .7) - padding 10px - border-radius 5px - width 300px - - - .header - text-transform uppercase - font-size 14px - - .title - text-transform uppercase - font-weight bold - color #28bacb - font-size 10px - - .url - text-transform uppercase - padding-left 5px - font-size 10px - a { - color: white; - } - """ - -update: (output, domEl) -> - # prep the dom - bodyDomEl = $(domEl).find(".body").empty() - - # find the tokens - tokens = output.trim().split('\n') - titles = []; - urls = []; - - for token, i in tokens - if i % 2 is 1 - titles.push token - else - urls.push token - - # real dom update - for title, i in titles - titleName = urls[i] - url = title.trim() - - bodyDomEl.append(""" -
- #{titleName} - #{url} -
- """)