It should be possible to control hat placement algorithmically.

Why is there only an option to modify hat placement with a mouse? It would be nice if we could also resize, move and rotate our hats without using a mouse.

Using a mouse can be difficult; you're trying to move the position, yet suddenly the size of item starts changing, and there's no easy way to change it back. It would be nice if we had other ways to access the hat controls; for example, with the keyboard, via input fields.

  • 1
    algorithmically, you say? Can you expand on that?
    – Oded
    Dec 15, 2015 at 10:26
  • @Oded maybe OP wants AI to do that automatically, detecting optimal position based on the picture.. Dec 15, 2015 at 10:35
  • @Sha - maybe. Sounds resource intensive and difficult to develop.
    – Oded
    Dec 15, 2015 at 10:37
  • @Oded piece of cake for balpha though, isn't it? ;-) Dec 15, 2015 at 10:37
  • 5
    You misspelled the phrase "could potentially be improved in my opinion".
    – balpha StaffMod
    Dec 15, 2015 at 10:40
  • 1
    cnst: I took the liberty of editing this, for a more neutral wording. I think the request is interesting, but that the original text was antagonizing people. Dec 15, 2015 at 10:49
  • It's just that mouse editing when there are no numbers shown is dodgy -- you're trying to move the position, yet suddenly the size of item starts changing, and there's no easy way to change it back
    – cnst
    Dec 15, 2015 at 11:14
  • @cnst Then I did misinterpret your question a bit; I've edited your comments into them. Dec 15, 2015 at 11:30
  • 1
    @S.L.Barth, lol, thank you, you're very kind! :-) most don't bother with re-editing! ^_^
    – cnst
    Dec 15, 2015 at 11:31
  • 1
    You're welcome! I think this question is a good idea; providing "accessibility" for hat controls. Dec 15, 2015 at 11:32

2 Answers 2


There are two ways to interact with Stack Exchange programmatically: via the API, and with userscripts.

The API does not provide methods for hats; at least no documented ones. There is not much reason to provide API methods for something we can use only 3 weeks per year.

Userscripts are an alternative; if you look at the source code for our hats, you will see that they are defined in a CSS class called wb-draggable.
For example, your hat is rotated using this line:

<div class="wb-draggable" style="width: 203px; transform: rotate(-88deg);" id="wb-rotscale-line"></div>

Obviously, modifying that line is going to change the hat only on your own device; a further analysis of the WinterBash code is necessary to see where the calls to Stack Exchange are made.
However, it is possible, if you're willing to spend time analyzing the code.

  • 1
    not looking for an API; more like an Inspector-style editing, where you can edit the numbers for size and precise positioning, or, really, any other way through a keyboard
    – cnst
    Dec 15, 2015 at 11:15
  • @cnst no such thing, I've looked a bit into the source code used for the controls, and it's highly... un-reverseable. I fear only those who wrote it can give a way to use it. Dec 15, 2015 at 12:07
  • @ShadowWizard, you have the source code, it runs in the browser, yet it's unreversable? Yeah, no such thing, indeed! :p
    – cnst
    Dec 15, 2015 at 13:16
  • @cnst feel free to try. :) Dec 15, 2015 at 13:17
  • 2
    I'm thinking of getting some help from the reverseengineering.stackexchange.com crowd. ;)
    – cnst
    Dec 15, 2015 at 13:17

Currently it's not possible.

As for workaround, you can use some application to move/control the mouse cursor/gestures with keyboard depending on OS which you're using.

For example, on Windows this can be found in Accessibility Options in the 'Control Panel'. For Ubuntu, check: Control mouse with keyboard.

Winter Bash has only small API which allows you to display number of hats per user, but nothing to control or change hat details, as the feature is mainly implemented in JS file.

See: How to get data related to Winter Bash? at stackapps

  • 1
    This is really not relevant to this question. Dec 30, 2015 at 19:07
  • This is just an idea that API can be extended by providing new requests to control user hats.
    – kenorb
    Dec 30, 2015 at 19:17
  • 1
    So it might fit as a comment, until someone really extends the API. Dec 30, 2015 at 19:19
  • Expanded a bit, to sounds more like an answer.
    – kenorb
    Dec 30, 2015 at 19:23

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .