Skip to content

Commit

Permalink
+ Fixed next-button if question is not displayed
Browse files Browse the repository at this point in the history
+ Disabled ads
  • Loading branch information
cmllr committed May 1, 2017
1 parent 6f6c0cd commit 5e5ea9c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
9 changes: 5 additions & 4 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#exit();
include "./bridge.php";
$description = isset($_GET["l"]) && $_GET["l"] === "2" ? "The distrochooser helps you to find the suitable Distribution for you!" : "Der Distrochooser hilft, im Dschungel der Linux-Distributionen die persönlich passende Distribution zu finden.";
$ads = false;
?>
<!DOCTYPE html>
<html id="app" lang="<?php echo isset($_GET["l"]) && $_GET["l"] === "2" ? 'en' : 'de';?>">
Expand Down Expand Up @@ -93,8 +94,8 @@
</li>
</li>
</ul>
<?php if (!isset($_SERVER["HTTP_DNT"]) || (isset($_SERVER["HTTP_DNT"]) && $_SERVER["HTTP_DNT"] === "0") ) :?>
<div class="advertisment-left col-lg-9">
<?php if ($ads && (!isset($_SERVER["HTTP_DNT"]) || (isset($_SERVER["HTTP_DNT"]) && $_SERVER["HTTP_DNT"] === "0") ) ):?>
<div class="advertisment advertisment-left col-lg-9">
<small>{{ text('advertisment') }}</small>
<iframe class="col-lg-9" src="https://chmr.eu/ad.html">

Expand Down Expand Up @@ -321,8 +322,8 @@ <h4 class="panel-title">
</div>
</div>
</div>
<?php if (!isset($_SERVER["HTTP_DNT"]) || (isset($_SERVER["HTTP_DNT"]) && $_SERVER["HTTP_DNT"] === "0") ) :?>
<div class="advertisment-middle col-lg-">
<?php if ($ads &&(!isset($_SERVER["HTTP_DNT"]) || (isset($_SERVER["HTTP_DNT"]) && $_SERVER["HTTP_DNT"] === "0") )) :?>
<div class="advertisment advertisment-middle col-lg-">
<small>{{ text('advertisment') }}</small>
<iframe src="https://chmr.eu/ad.html">

Expand Down
10 changes: 9 additions & 1 deletion ldc.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ vm = new Vue({
allowDifferentBackends: true,
backends: {
"waldorf": "https://waldorf.distrochooser.de",
"stetler": "https://distrochooser.de/distrochooser-backend-php",
},
backend: null,
lang:"de",
Expand Down Expand Up @@ -658,7 +659,14 @@ vm = new Vue({
if (needleIndex === this.questions.length -1){
this.displayResults();
}else{
$("[ldc-header='"+this.questions[needleIndex+1].id+"']").trigger("click",function(){
//get next question
for (var i=needleIndex +1;i<this.questions.length;i++){
if (this.isQuestionAllowed(this.questions[i])){
needleIndex = this.questions.indexOf(this.questions[i]);
break;
}
}
$("[ldc-header='"+this.questions[needleIndex].id+"']").trigger("click",function(){
window.scroll(0,$("[ldc-header='"+this.questions[needleIndex+1].id+"']").top);
});
}
Expand Down

0 comments on commit 5e5ea9c

Please sign in to comment.