Skip to content

Commit

Permalink
增加题目
Browse files Browse the repository at this point in the history
  • Loading branch information
haozi committed Mar 22, 2017
1 parent 077bc89 commit 121f066
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 3 additions & 3 deletions .script/checkVersion.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ if (dailyXyzReg.test(gitV)) {
}
}

function getPkgVersion() {
function getPkgVersion () {
return require('../package.json').version
}

function getGitVersion() {
function getGitVersion () {
const spawnSync = require('child_process').spawnSync
const gitReg = /\*\s*(.*)/
let gitVersion = ''
Expand All @@ -30,7 +30,7 @@ function getGitVersion() {
return gitVersion
}

function showError(e) {
function showError (e) {
const len = e.message.split('\n')[0].length * 1.6
console.log('\x1b[31m', '='.repeat(len))
console.log()
Expand Down
6 changes: 5 additions & 1 deletion src/Exam.vue
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,11 @@
try {
let code = `(function(){
'use strict';
var alert,prompt,confirm,location,window,top,self,parent,frames,open,document,Function,execScript,setTimeout,setInterval,console,localStorage,sessionStorage;
var alert,prompt,confirm,console,
location,document,open,
global,window,top,self,parent,frames,
Function,execScript,setTimeout,setInterval,
localStorage,sessionStorage;
return (
${beCode.trim()}
)(\`${escapeJS(feCode)}\`)
Expand Down

0 comments on commit 121f066

Please sign in to comment.