Skip to content

Instantly share code, notes, and snippets.

View lefnire's full-sized avatar

Tyler Renelle lefnire

View GitHub Profile
diff --git a/public/js/controllers/filtersCtrl.js b/public/js/controllers/filtersCtrl.js
index 8f665ea..172406a 100644
--- a/public/js/controllers/filtersCtrl.js
+++ b/public/js/controllers/filtersCtrl.js
@@ -41,9 +41,10 @@ habitrpg.controller("FiltersCtrl", ['$scope', '$rootScope', 'User',
ui.item.sortable.cancel();
},
stop: function(e, ui) {
- User.user.ops.sortTag({
- query: {from: ui.item.sortable.index, to:ui.item.sortable.dropindex}
diff --git a/script/index.coffee b/script/index.coffee
index 4f56d19..f81fd44 100644
--- a/script/index.coffee
+++ b/script/index.coffee
@@ -507,6 +507,7 @@ api.wrap = (user, main=true) ->
sortTask: (req, cb) ->
{id} = req.params
{to, from} = req.query
+ return cb?() if to is from
task = user.tasks[id]
diff --git a/script/index.coffee b/script/index.coffee
index 4f56d19..f81fd44 100644
--- a/script/index.coffee
+++ b/script/index.coffee
@@ -507,6 +507,7 @@ api.wrap = (user, main=true) ->
sortTask: (req, cb) ->
{id} = req.params
{to, from} = req.query
+ return cb?() if to is from
task = user.tasks[id]
## These are the failing tests when using the old code (they fail Markus's critical-time checks)
2 failing
1) Helper Check Two days apart yesterday two days ago before dayStart today before:
Error: expected 1 to sort of equal 2
+ expected - actual
+2
diff --git a/script/index.coffee b/script/index.coffee
index 71b153b..1fd6591 100644
--- a/script/index.coffee
+++ b/script/index.coffee
@@ -30,9 +30,10 @@ api.dotGet = (obj,path)->
{now} is also passed in for various purposes, one example being the test scripts scripts testing different "now" times
###
sanitizeOptions = (o) ->
- dayStart = if (!_.isNaN(+o.dayStart) and 0 <= +o.dayStart <= 24) then +o.dayStart else 0
- timezoneOffset = if o.timezoneOffset then +(o.timezoneOffset) else +moment().zone()
diff --git a/views/options/social/tavern.jade b/views/options/social/tavern.jade
index a7b7a12..66c0cf9 100644
--- a/views/options/social/tavern.jade
+++ b/views/options/social/tavern.jade
@@ -75,46 +75,60 @@
table.table.table-striped.panel-tiers
tr
td
- a.label.label-contributor-1(ng-click='toggleUserTier($event)')=env.t('friend') + ' (1-2)'
+ a.label.label-contributor-1(ng-click='toggleUserTier($event)') Tier 1
Cron
✓ computes shouldCron
✓ only dailies & todos are effected
preening
✓ should preen user history (40ms)
Todos
✓ 1 day missed
dailies
✓ calculates day differences with dayStart properly
new day
  • Refused to execute inline script because it violates the following Content Security Policy directive: "script-src 'self' chrome-extension-resource:". Either the 'unsafe-inline' keyword, a hash ('sha256-...'), or a nonce ('nonce-...') is required to enable inline execution. chrome-extension://jdfpnijdiejbhebabijgoibmnngiblhk/options.html:12
  • Refused to execute inline event handler because it violates the following Content Security Policy directive: "script-src 'self' chrome-extension-resource:". Either the 'unsafe-inline' keyword, a hash ('sha256-...'), or a nonce ('nonce-...') is required to enable inline execution. chrome-extension://jdfpnijdiejbhebabijgoibmnngiblhk/options.html:89

(screenshot)

diff --git a/lib/client/css/projects.styl b/lib/client/css/projects.styl
index 1b79e4e..29e3d46 100644
--- a/lib/client/css/projects.styl
+++ b/lib/client/css/projects.styl
@@ -518,9 +518,11 @@ table tr:first-child td
border-color:#ccc;
background-color: white !important;
-div.story:hover
- .decipher-tags:not(.inputActive):after
diff --git a/src/controllers/groups.js b/src/controllers/groups.js
index 2d0bd65..82e0c5c 100644
--- a/src/controllers/groups.js
+++ b/src/controllers/groups.js
@@ -216,6 +216,7 @@ api.getChat = function(req, res, next) {
*/
api.postChat = function(req, res, next) {
var user = res.locals.user
+ if (user.flags.chatRevoked) return res.json(401,{err:'Your chat privileges have been revoked.'});
var group = res.locals.group;