Add test page to gitlab.io
This commit is contained in:
parent
62d53b6f85
commit
f6b5627eaf
|
@ -7,6 +7,7 @@ before_script:
|
|||
|
||||
stages:
|
||||
- build
|
||||
- deploy
|
||||
|
||||
hash rules:
|
||||
stage: build
|
||||
|
@ -40,3 +41,9 @@ build chrome:
|
|||
artifacts:
|
||||
paths:
|
||||
- ClearUrls_chrome.zip
|
||||
|
||||
pages:
|
||||
stage: deploy
|
||||
artifacts:
|
||||
paths:
|
||||
- public
|
16
public/css/styles.css
Normal file
16
public/css/styles.css
Normal file
|
@ -0,0 +1,16 @@
|
|||
body {
|
||||
background-color: #FFFFFF;
|
||||
}
|
||||
.ui.menu .item img.logo {
|
||||
margin-right: 1.5em;
|
||||
}
|
||||
.main.container {
|
||||
margin-top: 7em;
|
||||
}
|
||||
.wireframe {
|
||||
margin-top: 2em;
|
||||
}
|
||||
.ui.footer.segment {
|
||||
margin: 5em 0em 0em;
|
||||
padding: 5em 0em;
|
||||
}
|
42
public/i253.html
Normal file
42
public/i253.html
Normal file
|
@ -0,0 +1,42 @@
|
|||
<!doctype html>
|
||||
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
|
||||
<title>ClearURLs - Issue 253</title>
|
||||
<meta name="description" content="ClearURLs test page">
|
||||
<meta name="author" content="Kevin Röbert">
|
||||
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.4.1/semantic.min.css">
|
||||
<link rel="stylesheet" href="css/styles.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="ui inverted menu">
|
||||
<div class="ui container">
|
||||
<a href="#" class="header item">
|
||||
<img class="logo" src="https://gitlab.com/KevinRoebert/ClearUrls/raw/master/img/clearurls.svg">
|
||||
ClearURLs
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="ui main text container">
|
||||
<h1 class="ui header">ClearURLs - Issue 253</h1>
|
||||
|
||||
<div class="ui negative icon message">
|
||||
<i class="huge warning sign icon"></i>
|
||||
<div class="content">
|
||||
<p>
|
||||
Your ClearURLs version is vulnerable to the problem from issue 253.
|
||||
Please update your ClearURLs installation to at least version <b>1.8.3 or higher</b>.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.4.1/semantic.min.js"></script>
|
||||
</body>
|
||||
</html>
|
55
public/index.html
Normal file
55
public/index.html
Normal file
|
@ -0,0 +1,55 @@
|
|||
<!doctype html>
|
||||
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
|
||||
<title>ClearURLs test page</title>
|
||||
<meta name="description" content="ClearURLs test page">
|
||||
<meta name="author" content="Kevin Röbert">
|
||||
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.4.1/semantic.min.css">
|
||||
<link rel="stylesheet" href="css/styles.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="ui inverted menu">
|
||||
<div class="ui container">
|
||||
<a href="#" class="header item">
|
||||
<img class="logo" src="https://gitlab.com/KevinRoebert/ClearUrls/raw/master/img/clearurls.svg">
|
||||
ClearURLs
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="ui main text container">
|
||||
<h1 class="ui header">ClearURLs test page</h1>
|
||||
|
||||
<p>
|
||||
On this page you can automatically check whether ClearURLs works correctly.
|
||||
If you are using an obsolete ClearURLs version that is affected by a potential security vulnerability,
|
||||
you will also be notified on this page.
|
||||
</p>
|
||||
|
||||
<br />
|
||||
|
||||
<div class="ui icon message" id="rules_filter_test"></div>
|
||||
<div class="ui icon message" id="redirection_filter_test"></div>
|
||||
<div class="ui icon message" id="block_filter_test"></div>
|
||||
<div class="ui icon message" id="issue_253_test"></div>
|
||||
|
||||
<iframe src="https://kevinroebert.gitlab.io/clearurls/void/index.html?ref=gitlab"
|
||||
height="0" width="0" id="void_roebert_eu_iframe"></iframe>
|
||||
|
||||
<iframe src="https://youtube.com/redirect?q=https%3A%2F%2Fkevinroebert.gitlab.io%2Fclearurls%2Fvoid%2Findex.html%3Fref%3Dgitlab"
|
||||
height="0" width="0" id="redirect_roebert_eu_iframe"></iframe>
|
||||
|
||||
<img id="i253_roebert_eu_img" height="0" width="0"/>
|
||||
<img id="block_roebert_eu_img" height="0" width="0"/>
|
||||
</div>
|
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.4.1/semantic.min.js"></script>
|
||||
<script src="js/scripts.js"></script>
|
||||
</body>
|
||||
</html>
|
113
public/js/scripts.js
Normal file
113
public/js/scripts.js
Normal file
|
@ -0,0 +1,113 @@
|
|||
/*
|
||||
* ClearURLs
|
||||
* Copyright (c) 2017-2019 Kevin Röbert
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/*jshint esversion: 6 */
|
||||
function checkRule() {
|
||||
let resURL;
|
||||
try {
|
||||
resURL = document.getElementById("void_roebert_eu_iframe").contentWindow.location.href;
|
||||
} catch(e) {
|
||||
resURL = "error";
|
||||
}
|
||||
|
||||
let segment = $('#rules_filter_test');
|
||||
|
||||
if(resURL === 'https://kevinroebert.gitlab.io/clearurls/void/index.html') {
|
||||
segment.addClass('positive');
|
||||
segment.append('<i class="large smile outline icon"></i>');
|
||||
segment.append('<div class="content"><p>The tracking filter function of ClearURLs works correctly.</p></div>');
|
||||
} else {
|
||||
segment.addClass('warning');
|
||||
segment.append('<i class="large frown outline icon"></i>');
|
||||
segment.append('<div class="content"><p>The tracking filter function of ClearURLs does <b>not</b> work properly. ' +
|
||||
'Maybe the addon is disabled or the rules could not be downloaded.</p></div>');
|
||||
}
|
||||
}
|
||||
|
||||
function checkRedirection() {
|
||||
let resURL;
|
||||
try {
|
||||
resURL = document.getElementById("redirect_roebert_eu_iframe").contentWindow.location.href;
|
||||
} catch(e) {
|
||||
resURL = "error";
|
||||
}
|
||||
|
||||
let segment = $('#redirection_filter_test');
|
||||
|
||||
if(resURL === 'https://kevinroebert.gitlab.io/clearurls/void/index.html') {
|
||||
segment.addClass('positive');
|
||||
segment.append('<i class="large smile outline icon"></i>');
|
||||
segment.append('<div class="content"><p>The redirection function of ClearURLs works correctly.</p></div>');
|
||||
} else {
|
||||
segment.addClass('warning');
|
||||
segment.append('<i class="large frown outline icon"></i>');
|
||||
segment.append('<div class="content"><p>The redirection function of ClearURLs does <b>not</b> work properly. ' +
|
||||
'Maybe the addon is disabled or the rules could not be downloaded.</p></div>');
|
||||
}
|
||||
}
|
||||
|
||||
function checkBlock() {
|
||||
let segment = $('#block_filter_test');
|
||||
|
||||
$('#block_roebert_eu_img')
|
||||
.on('load', function() {
|
||||
segment.addClass('warning');
|
||||
segment.append('<i class="large frown outline icon"></i>');
|
||||
segment.append('<div class="content"><p>The block function of ClearURLs does <b>not</b> work properly. ' +
|
||||
'Maybe the addon is disabled or the rules could not be downloaded.</p></div>');
|
||||
})
|
||||
.on('error', function() {
|
||||
segment.addClass('positive');
|
||||
segment.append('<i class="large smile outline icon"></i>');
|
||||
segment.append('<div class="content"><p>The block function of ClearURLs works correctly.</p></div>');
|
||||
})
|
||||
.attr("src", 'https://www.contentpass.de/img/logo.svg');
|
||||
}
|
||||
|
||||
function checkIssue253() {
|
||||
let segment = $('#issue_253_test');
|
||||
|
||||
$('#i253_roebert_eu_img')
|
||||
.on('load', function() {
|
||||
segment.addClass('negative');
|
||||
segment.append('<i class="large frown outline icon"></i>');
|
||||
segment.append('<div class="content"><p>Your ClearURLs version is vulnerable to the problem from issue 253. ' +
|
||||
'Please update your ClearURLs installation to at least version <b>1.8.3 or higher</b>.</p></div>');
|
||||
})
|
||||
.on('error', function() {
|
||||
segment.addClass('positive');
|
||||
segment.append('<i class="large smile outline icon"></i>');
|
||||
segment.append('<div class="content"><p>Your ClearURLs version is not vulnerable to the problem from Issue 253.</p></div>');
|
||||
})
|
||||
.attr("src", 'https://www.google.com/url?rct=j&url=https%3A%2F%2Fkevinroebert.gitlab.io%2Fclearurls%2Fi253.html');
|
||||
}
|
||||
|
||||
$(window).on('load', function () {
|
||||
try {
|
||||
checkRule();
|
||||
} catch(e) {}
|
||||
try {
|
||||
checkRedirection();
|
||||
} catch(e) {}
|
||||
try {
|
||||
checkBlock();
|
||||
} catch(e) {}
|
||||
try {
|
||||
checkIssue253();
|
||||
} catch(e) {}
|
||||
});
|
0
public/void/index.html
Normal file
0
public/void/index.html
Normal file
Loading…
Reference in New Issue
Block a user