Giter Club home page Giter Club logo

drawception-anbt's People

Contributors

darkdaskin avatar denilsonsa avatar grompe avatar lahgolz avatar vpzomtrrfrt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

drawception-anbt's Issues

Fixes for HTTPS

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).

Can't submit draw first games

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.

Smoothening threshold in new canvas should be customizable

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.
Example

Ideally the new canvas should have hotkeys to tune the value dynamically, while the initial value is set on options page.

"Time's up" message when game quota is over

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.

SecurityError in new canvas

When opening the sandbox or a game while using the new canvas, an alert appears saying "SecurityError: The operation is insecure. line: 5209"
capture
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.

Replace RegExp HTML parsing

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>

Pressure sensitivity leaves blots

Issue still appears with old canvas and pressure sensitivity enabled.

example

Possibly detection code when tablet or mouse is used is at fault.

Games immediately running out of time

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

TypeError in new canvas in Android Firefox

After the latest update, the following error occurs whenever I attempt to do anything (draw, change color, skip, go back to homepage) in the new canvas, either sandbox or in game: screenshot_20180305-123513
This doesn't happen in the desktop version of Firefox.

Various iOS issues

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.