grompe / drawception-anbt Goto Github PK
View Code? Open in Web Editor NEWA userscript to make Drawception.com better
License: The Unlicense
A userscript to make Drawception.com better
License: The Unlicense
The report button isn't showing up. http://puu.sh/q7L1C/188dc4dd0d.png
someone's not following their panel, and I have to disable ANBT to report.. ಠ_ಠ
ANBT does work wonders for mobile drawing (sandbox wise) but there's a couple issue here that is breaking everything for playing
Caption requests show up as Drawing requests with no prompt
Drawing requests show up properly
The Skip button and Exit button, probably anything involving the game token ends up sending 'false' as the game token, so it never skips or exits.
Currently the smoothening threshold is hardcoded to 1 which produces terrible results when drawing with a mouse slowly. For me the value of 3 produces best results, but it may depend on input manipulator used and computer performance, so it should be customizable.
Ideally the new canvas should have hotkeys to tune the value dynamically, while the initial value is set on options page.
the panel itself submits, but the page refuses to refresh and the submit button gets disabled
happens in both yandex and chrome
When I try to submit a draw first game using the new canvas, the server responds with HTTP 500. The problem is that the gameid
is parsed as "([^"
while the page source actually contains the value as it should and your regex matches it correctly when executing it manually.
I tried to create a game 3 times without success (wasting my precious coins) until I figured out that this is the script issue. At the same time I can participate in other games and post drawings without problems.
Also parsing HTML with regex is generally a bad idea.
If I have reached the maximum possible number of games in progress, I get the Time's up! mesage using the new canvas immediately upon clicking Play. It should show proper message instead and do not offer to submit.
When opening the sandbox or a game while using the new canvas, an alert appears saying "SecurityError: The operation is insecure. line: 5209"
This is not something that Firefox does normally for this kind of error; something on the page or in the userscript is launching an alert in response to the error.
This doesn't happen in the default canvas, so the error itself is caused by something in the new canvas. However, it is possible that Drawception itself causing the alert.
This is a minor inconvenience but it would be nice if (a) the error could be fixed or (b) if alert could be suppressed for this particular error if in fact the alert is launched by ANBT.
This does not affect the usability of the rest of the page.
This happens in Firefox 59 but not the latest version of Chrome.
If I try browsing Drawception using https://
, instead of http://
, then I get a warning on the console:
[blocked] The page at 'https://drawception.com/settings/' was loaded over HTTPS, but ran insecure content from 'http://chat.grompe.org.ru/jappix-mini.js': this content should also be loaded over HTTPS.
In addition, there might be some other warnings that I have not noticed yet (because I have just toggled to HTTPS, I haven't even tried to play a full game on it yet). Looking at *.user.js
source-code, I can see a bunch of CSS backgrounds pointing to HTTP (instead of protocol-less URLs).
As mentioned in #11, parsing HTML with RegExp is prone to errors.
Test and use the following:
<!doctype html>
<h1 id="result">...</h1>
<script>
function parseHTML(str)
{
var doc = document.implementation.createHTMLDocument("");
doc.body.innerHTML = str;
return doc;
}
var doc = parseHTML('<div><script>alert("broken")</'+'script><a href="http://google.com/">link</a></div>');
var res = doc.querySelectorAll('a[href^="http"]');
document.getElementById("result").innerHTML = res[0].href;
</script>
http://puu.sh/qtVkr/04f5c8dfe9.png
http://puu.sh/qtVRk/9f037e1dca.png
Every game I go to it seems that I immediately run out of time?
I skip that game, it goes to sandbox (and says i'm out of time in sandbox?)
the only time i can actually do anything is when i'm placed on a describe panel (which i have to turn off the script first to do so anyways) it works fine without the script and i've tried turning off "
Confirm submitting if more than a minute is left (New canvas only)" which seemed like it would be linked to the problem, but it wasnt. Sorry if i'm missing something, I've never had this problem before.
everything works perfectly fine when i turn it off, but when i turn it back on every drawing panel is times up as soon as i enter it
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.