This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| twitter.com##article:has(a:has-text(/liked|replied|follow/i)) | |
| twitter.com##article:has(a:has-text(/liked|replied|follow/i)):xpath(../..) + div | |
| twitter.com##article:has(a:has-text(/liked|replied|follow/i)):xpath(../..) + div + div | |
| twitter.com##div > div > div > div > div > div > div > div > div > div:has-text(/You might like|Trends for you|Who to follow/) | |
| twitter.com##div [role="heading"]:has-text(/Who to follow/):xpath(..) | |
| twitter.com##div [role="heading"]:has-text(/Who to follow/):xpath(../../..) + div | |
| twitter.com##div [role="heading"]:has-text(/Who to follow/):xpath(../../..) + div + div | |
| twitter.com##div [role="heading"]:has-text(/Who to follow/):xpath(../../..) + div + div + div | |
| twitter.com##div [role="heading"]:has-text(/Who to follow/):xpath(../../..) + div + div + div + div |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Created by Sabe on 6/15/2015. | |
| */ | |
| 'use strict'; | |
| angular | |
| .module('habitrpg') | |
| .factory('Analytics', analyticsFactory); | |
| analyticsFactory.$inject = [ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Created by Sabe on 6/11/2015. | |
| */ | |
| 'use strict'; | |
| describe('Analytics Service', function () { | |
| var analytics; | |
| var onScriptLoad; | |
| beforeEach(function() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| script(type='text/ng-template', id='partials/options.inventory.seasonalshop.html') | |
| .container-fluid | |
| .stable.row | |
| .col-md-2 | |
| .seasonalshop_winter2015 | |
| .col-md-10 | |
| .popover.static-popover.fade.right.in | |
| .arrow | |
| h3.popover-title!=env.t('seasonalShopTitle', {linkStart:"<a href='http://blog.habitrpg.com/who' target='_blank'>", linkEnd: "</a>"}) | |
| .popover-content |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| purchase: (req, cb, ga) -> | |
| {type,key} = req.params | |
| if type is 'gems' and key is 'gem' | |
| {convRate, convCap} = api.planGemLimits | |
| convCap += user.purchased.plan.consecutive.gemCapExtra | |
| return cb?({code:401,message:"Must subscribe to purchase gems with GP"},req) unless user.purchased?.plan?.customerId | |
| return cb?({code:401,message:"Not enough Gold"}) unless user.stats.gp >= convRate | |
| return cb?({code:401,message:"You've reached the Gold=>Gem conversion cap (#{convCap}) for this month. We have this to prevent abuse / farming. The cap will reset within the first three days of next month."}) if user.purchased.plan.gemsBought >= convCap | |
| user.balance += .25 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| script(type='text/ng-template', id='partials/options.inventory.seasonalshop.html') | |
| .container-fluid | |
| .stable.row | |
| .col-md-2 | |
| .seasonalshop_winter2015 | |
| .col-md-10 | |
| .popover.static-popover.fade.right.in | |
| .arrow | |
| h3.popover-title!=env.t('seasonalShopTitle', {linkStart:"<a href='http://blog.habitrpg.com/who' target='_blank'>", linkEnd: "</a>"}) | |
| .popover-content |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| if user.preferences.automaticAllocation | |
| tallies = _.reduce user.tasks, ((m,v)-> m[v.attribute or 'str'] += v.value;m), {str:0,int:0,con:0,per:0} | |
| suggested = _.reduce tallies, ((m,v,k)-> if v>tallies[m] then k else m), 'str' | |
| user.stats[suggested]++ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| genders = ['f','m'] | |
| hairs = ['blond','black','brown','white'] | |
| skins = ['dead','orc','asian','black','white'] | |
| genders[Math.floor(Math.random()*(genders.length))] | |
| hairs[Math.floor(Math.random()*(hairs.length))] | |
| skins[Math.floor(Math.random()*(skins.length))] |