mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 14:47:53 +01:00
feat(ads): remove ads completely
This commit is contained in:
1
common/dist/scripts/habitrpg-shared.js
vendored
1
common/dist/scripts/habitrpg-shared.js
vendored
@@ -7173,6 +7173,7 @@ process.browser = true;
|
|||||||
process.env = {};
|
process.env = {};
|
||||||
process.argv = [];
|
process.argv = [];
|
||||||
process.version = ''; // empty string to avoid regexp issues
|
process.version = ''; // empty string to avoid regexp issues
|
||||||
|
process.versions = {};
|
||||||
|
|
||||||
function noop() {}
|
function noop() {}
|
||||||
|
|
||||||
|
|||||||
@@ -201,23 +201,6 @@ habitrpg.controller("TasksCtrl", ['$scope', '$rootScope', '$location', 'User','N
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
------------------------
|
|
||||||
Ads
|
|
||||||
------------------------
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* See conversation on http://productforums.google.com/forum/#!topic/adsense/WYkC_VzKwbA,
|
|
||||||
* Adsense is very sensitive. It must be called once-and-only-once for every <ins>, else things break.
|
|
||||||
* Additionally, angular won't run javascript embedded into a script template, so we can't copy/paste
|
|
||||||
* the html provided by adsense - we need to run this function post-link
|
|
||||||
*/
|
|
||||||
$scope.initAds = function(){
|
|
||||||
$.getScript('//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js');
|
|
||||||
(window.adsbygoogle = window.adsbygoogle || []).push({});
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
------------------------
|
------------------------
|
||||||
Hiding Tasks
|
Hiding Tasks
|
||||||
|
|||||||
@@ -18,16 +18,6 @@ habitrpg.directive('taskFocus',
|
|||||||
}
|
}
|
||||||
]);
|
]);
|
||||||
|
|
||||||
habitrpg.directive('habitrpgAdsense', function() {
|
|
||||||
return {
|
|
||||||
restrict: 'A',
|
|
||||||
transclude: true,
|
|
||||||
replace: true,
|
|
||||||
template: '<div ng-transclude></div>',
|
|
||||||
link: function ($scope, element, attrs) {}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
habitrpg.directive('whenScrolled', function() {
|
habitrpg.directive('whenScrolled', function() {
|
||||||
return function(scope, elm, attr) {
|
return function(scope, elm, attr) {
|
||||||
var raw = elm[0];
|
var raw = elm[0];
|
||||||
|
|||||||
@@ -238,9 +238,6 @@ script(id='partials/options.settings.export.html', type="text/ng-template")
|
|||||||
|
|
||||||
mixin subPerks()
|
mixin subPerks()
|
||||||
table.table.table-striped
|
table.table.table-striped
|
||||||
tr
|
|
||||||
td
|
|
||||||
span.hint(popover=env.t('disableAdsText'),popover-trigger='mouseenter',popover-placement='right')=env.t('disableAds')
|
|
||||||
tr
|
tr
|
||||||
td
|
td
|
||||||
span.hint(popover=env.t('buyGemsGoldText', {gemCost: "{{Shared.planGemLimits.convRate}}", gemLimit: "{{Shared.planGemLimits.convCap}}"}),popover-trigger='mouseenter',popover-placement='right') #{env.t('buyGemsGold')}
|
span.hint(popover=env.t('buyGemsGoldText', {gemCost: "{{Shared.planGemLimits.convRate}}", gemLimit: "{{Shared.planGemLimits.convCap}}"}),popover-trigger='mouseenter',popover-placement='right') #{env.t('buyGemsGold')}
|
||||||
|
|||||||
@@ -41,11 +41,6 @@ script(type='text/ng-template', id='partials/options.social.hall.heroes.html')
|
|||||||
label=env.t('balance')
|
label=env.t('balance')
|
||||||
input.form-control(type='number', step="any", ng-model='hero.balance')
|
input.form-control(type='number', step="any", ng-model='hero.balance')
|
||||||
small!= '`user.balance`' + env.t('notGems')
|
small!= '`user.balance`' + env.t('notGems')
|
||||||
.form-group
|
|
||||||
.checkbox
|
|
||||||
label
|
|
||||||
input(type='checkbox', ng-model='hero.purchased.ads')
|
|
||||||
=env.t('hideAds')
|
|
||||||
accordion
|
accordion
|
||||||
accordion-group(heading='Items')
|
accordion-group(heading='Items')
|
||||||
h4 Update Item
|
h4 Update Item
|
||||||
|
|||||||
@@ -142,12 +142,4 @@ script(id='templates/habitrpg-tasks.html', type="text/ng-template")
|
|||||||
|
|
||||||
br
|
br
|
||||||
|
|
||||||
// Ads
|
|
||||||
div(ng-if='::main && !user.purchased.ads && !user.purchased.plan.customerId && list.type!="reward" && user.stats.lvl>1')
|
|
||||||
span.pull-right
|
|
||||||
a(ui-sref='options.settings.subscription', popover=env.t('removeAds'), popover-trigger='mouseenter')
|
|
||||||
span.glyphicon.glyphicon-remove
|
|
||||||
// Habit3
|
|
||||||
ins.adsbygoogle(ng-init='initAds()', style='display: inline-block; width: 234px; height: 60px;', data-ad-client='ca-pub-3242350243827794', data-ad-slot='9529624576')
|
|
||||||
|
|
||||||
+taskColumnTabs('bottom')
|
+taskColumnTabs('bottom')
|
||||||
|
|||||||
@@ -82,7 +82,6 @@ block content
|
|||||||
th
|
th
|
||||||
h5=env.t('gameFeatures') + ':'
|
h5=env.t('gameFeatures') + ':'
|
||||||
ul
|
ul
|
||||||
li=env.t('gameNoAds')
|
|
||||||
li
|
li
|
||||||
span.dashed-underline(popover=env.t('gold2GemText'),popover-trigger='mouseenter',popover-placement='right')=env.t('gold2Gem')
|
span.dashed-underline(popover=env.t('gold2GemText'),popover-trigger='mouseenter',popover-placement='right')=env.t('gold2Gem')
|
||||||
li
|
li
|
||||||
|
|||||||
Reference in New Issue
Block a user