clean up shit
This commit is contained in:
parent
2f1b66e793
commit
baa5d413f5
@ -1,7 +0,0 @@
|
|||||||
dist: xenial
|
|
||||||
language: generic
|
|
||||||
install: npm install
|
|
||||||
script: make
|
|
||||||
branches:
|
|
||||||
only:
|
|
||||||
- master
|
|
||||||
@ -1 +0,0 @@
|
|||||||
Chromium 73.0.3683.75 built on Debian buster/sid, running on Debian buster/sid
|
|
||||||
@ -109,7 +109,7 @@
|
|||||||
"@violentmonkey/types": "^0.1.5",
|
"@violentmonkey/types": "^0.1.5",
|
||||||
"chrome-webstore-upload": "^1.0.0",
|
"chrome-webstore-upload": "^1.0.0",
|
||||||
"esprima": "^4.0.1",
|
"esprima": "^4.0.1",
|
||||||
"jshint": "^2.13.4",
|
"eslint": "^8.0.1",
|
||||||
"jszip": "^3.10.0",
|
"jszip": "^3.10.0",
|
||||||
"lodash.template": "^4.5.0",
|
"lodash.template": "^4.5.0",
|
||||||
"markdown-it": "^12.3.2",
|
"markdown-it": "^12.3.2",
|
||||||
|
|||||||
@ -1,34 +1,38 @@
|
|||||||
{
|
{
|
||||||
"undef": true,
|
"undef": true,
|
||||||
"unused": true,
|
"unused": true,
|
||||||
"eqnull": true,
|
"eqnull": true,
|
||||||
"expr": true,
|
"expr": true,
|
||||||
"sub": true,
|
"sub": true,
|
||||||
"scripturl": true,
|
"scripturl": true,
|
||||||
"multistr": true,
|
"multistr": true,
|
||||||
"browser": true,
|
"browser": true,
|
||||||
"devel": true,
|
"devel": true,
|
||||||
"nonstandard": true,
|
"nonstandard": true,
|
||||||
"-W018": true,
|
"-W018": true,
|
||||||
"-W084": true,
|
"-W084": true,
|
||||||
"-W083": true,
|
"-W083": true,
|
||||||
"-W093": true,
|
"-W093": true,
|
||||||
"globals": {
|
"globals": {
|
||||||
"MediaError": false,
|
"MediaError": false,
|
||||||
"Set": false,
|
"Set": false,
|
||||||
"Promise": false,
|
"Promise": false,
|
||||||
"BroadcastChannel": false,
|
"BroadcastChannel": false,
|
||||||
"GM_info": false,
|
"GM_info": false,
|
||||||
"cloneInto": false,
|
"cloneInto": false,
|
||||||
"XPCNativeWrapper": false,
|
"XPCNativeWrapper": false,
|
||||||
"unsafeWindow": false,
|
"unsafeWindow": false,
|
||||||
"chrome": false,
|
"chrome": false,
|
||||||
"GM": false<%=
|
"GM": false<%=
|
||||||
meta.grants.filter(x => !/\./.test(x)).map(x => `,\n "${x}": false`).join('')
|
meta.grants.filter(x => !/\./.test(x)).map(x => `,\n "${x}": false`).join('')
|
||||||
%><%=
|
%><%=
|
||||||
read('/tmp/declaration.js').match(/^var (.*);/)[1].split(', ').map(x => `,\n "${x}": true`).join('')
|
read('/tmp/declaration.js').match(/^var (.*);/)[
|
||||||
|
1
|
||||||
|
].split(', ').map(x => `,\n "${x}": true`).join('')
|
||||||
%><%=
|
%><%=
|
||||||
read('/src/globals/globals.js').match(/^var (.*);/)[1].split(', ').map(x => `,\n "${x}": true`).join('')
|
read('/src/globals/globals.js').match(/^var (.*);/)[
|
||||||
|
1
|
||||||
|
].split(', ').map(x => `,\n "${x}": true`).join('')
|
||||||
%>
|
%>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
74
template.jst
74
template.jst
@ -1,74 +0,0 @@
|
|||||||
<!doctype html>
|
|
||||||
<html><head>
|
|
||||||
<meta charset="utf-8">
|
|
||||||
<title>4chan X</title>
|
|
||||||
<link rel="stylesheet" href="web.css">
|
|
||||||
<link rel="icon" href="img/icon.gif">
|
|
||||||
<link rel="chrome-webstore-item" href="https://chrome.google.com/webstore/detail/ohnjgmpcibpbafdlkimncjhflgedgpam">
|
|
||||||
</head><body>
|
|
||||||
<div id="header">
|
|
||||||
<h1 id="4chan-x">4chan X</h1>
|
|
||||||
<div id="links">
|
|
||||||
<a href="https://github.com/ccd0/4chan-x">Source Code</a>
|
|
||||||
<a href="https://github.com/ccd0/4chan-x/blob/master/CHANGELOG.md">Changelog</a>
|
|
||||||
<a href="https://github.com/ccd0/4chan-x/wiki/Frequently-Asked-Questions">FAQ</a>
|
|
||||||
<a href="https://github.com/ccd0/4chan-x/wiki/Privacy">Privacy</a>
|
|
||||||
<a href="https://github.com/ccd0/4chan-x/issues">Report Bugs</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<a class="screenshot" href="img/screenshot.png"><img src="img/screenshot.png" alt="Screenshot"></a>
|
|
||||||
<%=
|
|
||||||
content
|
|
||||||
.match(/<\/h1>([^]*)<h2 id="more-information"/)[1]
|
|
||||||
.replace(
|
|
||||||
/(<h3 id="(.*?)">)(.*?)(<\/h3>[^]*?)(?=<h)/g,
|
|
||||||
'<input hidden type="checkbox" id="$2-hide"><div>$1<label for="$2-hide">$3</label>$4</div>'
|
|
||||||
)
|
|
||||||
%>
|
|
||||||
<script>
|
|
||||||
function imagePreview() {
|
|
||||||
this.removeEventListener('mouseover', imagePreview, false);
|
|
||||||
var img = new Image();
|
|
||||||
img.src = this.href;
|
|
||||||
img.alt = 'preview';
|
|
||||||
var span = document.createElement('span');
|
|
||||||
span.className = 'hover';
|
|
||||||
span.appendChild(img);
|
|
||||||
this.parentNode.insertBefore(span, this.nextSibling);
|
|
||||||
}
|
|
||||||
function storeInstall(e) {
|
|
||||||
if (!e.shiftKey && !e.altKey && !e.ctrlKey && !e.metaKey && e.button === 0) {
|
|
||||||
var url = this.href;
|
|
||||||
chrome.webstore.install(url, function(){}, function(){
|
|
||||||
location.href = url;
|
|
||||||
});
|
|
||||||
e.preventDefault();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
for (var i = 0; i < document.links.length; i++) {
|
|
||||||
var link = document.links[i];
|
|
||||||
if (/\.png$/.test(link.pathname) && !link.querySelector('.hover')) {
|
|
||||||
link.addEventListener('mouseover', imagePreview, false);
|
|
||||||
} else if (window.chrome && link.host === 'chrome.google.com') {
|
|
||||||
link.addEventListener('click', storeInstall, false);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
var engine = (function() {
|
|
||||||
if (/Edge\//.test(navigator.userAgent)) return 'edge';
|
|
||||||
if (/Chrome\//.test(navigator.userAgent)) return 'blink';
|
|
||||||
if (/WebKit\//.test(navigator.userAgent)) return 'webkit';
|
|
||||||
if (/Gecko\/|Goanna/.test(navigator.userAgent)) return 'gecko';
|
|
||||||
if (/Presto\//.test(navigator.userAgent)) return 'presto';
|
|
||||||
})();
|
|
||||||
var engines = {'firefox': 'gecko', 'chromium': 'blink presto', 'safari': 'webkit', 'webkitgtk-qtwebkit-qtwebengine': 'webkit', 'ms-edge': 'edge', 'other-browsers': ''};
|
|
||||||
if (location.hash.slice(1) in engines) {
|
|
||||||
for (browser in engines) {
|
|
||||||
document.getElementById(browser + '-hide').checked = (browser !== location.hash.slice(1));
|
|
||||||
}
|
|
||||||
} else if (engine) {
|
|
||||||
for (browser in engines) {
|
|
||||||
document.getElementById(browser + '-hide').checked = (engines[browser].indexOf(engine) < 0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
</body></html>
|
|
||||||
@ -1,6 +0,0 @@
|
|||||||
{
|
|
||||||
"esnext": true,
|
|
||||||
"undef": true,
|
|
||||||
"unused": true,
|
|
||||||
"node": true
|
|
||||||
}
|
|
||||||
105
web.css
105
web.css
@ -1,105 +0,0 @@
|
|||||||
body {
|
|
||||||
font-family: "Helvetica Neue", Helvetica, "Segoe UI", Arial, freesans, sans-serif;
|
|
||||||
margin: 1em;
|
|
||||||
}
|
|
||||||
#header {
|
|
||||||
background-color: #eee;
|
|
||||||
margin-bottom: 1em;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
h1 {
|
|
||||||
margin: 0;
|
|
||||||
line-height: 1.5;
|
|
||||||
}
|
|
||||||
#links {
|
|
||||||
background-color: #e0e0e0;
|
|
||||||
display: table;
|
|
||||||
width: 100%;
|
|
||||||
height: 1.5em;
|
|
||||||
}
|
|
||||||
#links > a {
|
|
||||||
display: table-cell;
|
|
||||||
vertical-align: middle;
|
|
||||||
width: 20%;
|
|
||||||
color: #000;
|
|
||||||
text-decoration: none;
|
|
||||||
}
|
|
||||||
#links > a:hover,
|
|
||||||
#links > a:focus {
|
|
||||||
background-color: #CCC;
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
a.screenshot {
|
|
||||||
display: block;
|
|
||||||
width: 640px;
|
|
||||||
max-width: 100%;
|
|
||||||
margin: auto;
|
|
||||||
}
|
|
||||||
a.screenshot > img {
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
@media (min-width: 1120px) {
|
|
||||||
a.screenshot {
|
|
||||||
float: right;
|
|
||||||
margin: 0 0 1em 1em;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
span.hover {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
a:hover + span.hover {
|
|
||||||
display: block;
|
|
||||||
position: fixed;
|
|
||||||
top: 0;
|
|
||||||
bottom: 0;
|
|
||||||
left: 0;
|
|
||||||
right: 0;
|
|
||||||
pointer-events: none;
|
|
||||||
background: rgba(0,0,0,0.4);
|
|
||||||
}
|
|
||||||
span.hover > img {
|
|
||||||
position: absolute;
|
|
||||||
top: 0;
|
|
||||||
bottom: 0;
|
|
||||||
left: 0;
|
|
||||||
right: 0;
|
|
||||||
margin: auto;
|
|
||||||
width: auto;
|
|
||||||
height: auto;
|
|
||||||
max-width: 100%;
|
|
||||||
max-height: 100%;
|
|
||||||
box-shadow: 5px 5px 20px rgba(0,0,0,0.4);
|
|
||||||
}
|
|
||||||
@media (max-width: 960px) {
|
|
||||||
a.screenshot:hover + span.hover {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@supports not (pointer-events: auto) {
|
|
||||||
a[href$=".png"] {
|
|
||||||
position: relative;
|
|
||||||
}
|
|
||||||
a[href$=".png"]::after {
|
|
||||||
content: " ";
|
|
||||||
position: absolute;
|
|
||||||
top: 0;
|
|
||||||
bottom: 0;
|
|
||||||
left: 0;
|
|
||||||
right: 0;
|
|
||||||
z-index: 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
h2 ~ p, h2 ~ p + ul, input + div, div > h3 ~ * {
|
|
||||||
margin-left: 1em;
|
|
||||||
}
|
|
||||||
input + div {
|
|
||||||
margin-top: 1em;
|
|
||||||
margin-bottom: 1em;
|
|
||||||
margin-left: 1em;
|
|
||||||
}
|
|
||||||
h3 {
|
|
||||||
display: inline;
|
|
||||||
}
|
|
||||||
input:checked + div > h3 ~ * {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
Loading…
x
Reference in New Issue
Block a user