Add task for setting captcha complaints redirect.

This commit is contained in:
ccd0 2015-10-27 13:24:08 -07:00
parent 4099936088
commit 3995ab1b01
3 changed files with 14 additions and 4 deletions

2
.gitignore vendored
View File

@ -6,6 +6,6 @@ tmp-crx/
tmp-userscript/ tmp-userscript/
testbuilds/ testbuilds/
test.html test.html
captchas*.html captchas.html
install.json install.json
Gruntfile.js Gruntfile.js

View File

@ -469,9 +469,9 @@ module.exports = (grunt) ->
'shell:poststore' 'shell:poststore'
] ]
grunt.registerTask 'captchas', [ grunt.registerTask 'captchas', 'Set captcha complaints redirect.', (url='https://www.4chan.org/feedback') ->
'shell:captchas' grunt.file.write 'captchas.html', grunt.template.process(grunt.file.read('redirect.html'), data: {url})
] grunt.task.run 'shell:captchas'
grunt.registerTask 'setversion', 'Set the version number', (version) -> grunt.registerTask 'setversion', 'Set the version number', (version) ->
pkg = grunt.file.readJSON 'package.json' pkg = grunt.file.readJSON 'package.json'

10
redirect.html Normal file
View File

@ -0,0 +1,10 @@
<!doctype html>
<html><head>
<meta charset="utf-8">
<meta http-equiv="refresh" content="0; url=<%= url %>">
<title>Redirect</title>
</head>
<body>
Redirecting to <a href="<%= url %>"><%= url %></a>...
</body>
</html>