Skip to content
This repository has been archived by the owner on Feb 14, 2022. It is now read-only.

Commit

Permalink
Display error message when vote failed
Browse files Browse the repository at this point in the history
  • Loading branch information
shiftpsh committed Aug 7, 2019
1 parent da8c6da commit 1df61b0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion content.js
Expand Up @@ -64,7 +64,7 @@ function initializeVoting(token, problemId, votedFlag) {
const func = "var params={'token':'"+token+"','id':"+problemId+",'level':"+i+"};" +
"var o=new XMLHttpRequest;" +
"o.open('POST','https://api.solved.ac/vote_difficulty.php',!0)," +
"o.onload=function(){o.status>=200&&o.status<400&&location.reload()}," +
"o.onload=function(){(o.status>=200&&o.status<400&&location.reload())||(alert(JSON.parse(o.responseText).error))}," +
"o.send(JSON.stringify(params))";
difficultySection.innerHTML += "<span onclick=\"" + func + "\">" + levelLabel(i) + "</a>";
if (i % 5 == 0) difficultySection.innerHTML += "<br>";
Expand Down
2 changes: 1 addition & 1 deletion manifest.json
@@ -1,6 +1,6 @@
{
"name": "solved.ac",
"version": "1.1.3",
"version": "1.1.4",
"description": "Problem difficulty informations for BOJ",
"manifest_version": 2,
"author": "shiftpsh",
Expand Down

0 comments on commit 1df61b0

Please sign in to comment.