Code golf: Will someone post <=68 characters of Javascript code that I can use to resolve this market to YES?
Basic
6
Ṁ622
resolved Mar 30
Resolved
YES

Sequel to /IsaacKing/code-golf-will-someone-post-70-char

Post Javascript code in the market comments. I will run each piece of code that's 68 characters or less and doesn't use fetch() or another way of bringing in external code in my JS console on this page. (Including from comments.) If this results in this market resolving to YES, so be it. If the market is still unresolved by the close date, it resolves to NO.

If I suspect that your code will do something that I do not want it to do, such as resolve this market to NO or send you all of my mana, I will not run it. (And if that fails, I reserve the right to resolve this market N/A.)

As a change from previous markets, I am now in full cooperation with the golfers in attempting to resolve this market YES. I will provide any relevant information they ask for, such as my browser environment and any error messages or other results of running a certain code snippet. And I will no longer try to foil their plans, such as by resizing the window to change the page layout. (I do however reserve the right to refuse certain requests, such as a request to buy or sell shares in order to change what buttons exist.)

Get
Ṁ1,000
and
S3.00
Sort by:
predictedYES

Alright, that was too easy. I should have checked what shorter classes there were shared among all the relevant buttons. I've done that now and I think this one's actually a challenge:

predictedYES
  1. i=0;setInterval(b=>b(".font-md").at(-[4,6,2,1][i++]).click(),9,$$)

predictedYES

@levifinkelstein I tested this as well and it worked for me

predictedYES

@levifinkelstein How many characters is this?

predictedYES

@A 66

predictedYES

@A

you can do this in console to quickly check

i=0;setInterval(b=>b(".font-md").at([3,6,10,13][i++]).click(),9,$$)

reload page before running

predictedYES

@levifinkelstein hmm I probably should've asked what browser you're using

predictedYES
predictedYES

@IsaacKing did you try the code?

predictedYES

@levifinkelstein Not yet. Why do I need to reload the page before running it?

predictedYES

@IsaacKing to reset anything you've done like expand a panel

predictedYES

@levifinkelstein I don't think this is going to work. $$(".font-md").at(3) is the "show less" button.

predictedYES

@IsaacKing I tested it on a duplicate of this market and it worked, but maybe something is different for you

predictedYES

@levifinkelstein Did your test market have a description long enough to necessitate a "show less" button?

predictedYES
predictedYES

@IsaacKing what are your 4 first buttons then?

predictedYES

@levifinkelstein I just ran the code twice, once with the description expanded and once with it minimized. Both times the code didn't resolve the market and instead took me to the market creation page.

predictedYES

@levifinkelstein I don't want to fully join the golfing team and spend a lot of time on this, but if you give me a code snippet to list all my buttons, I'll run it and post the result.

predictedYES

@levifinkelstein Possibly the fact that nobody bet in your test market is the problem? Since it means the positions and traders tabs don't exist.

predictedYES

@IsaacKing good point

What happens if you run the code and it resolves the market to NO?

@levifinkelstein I'll try to avoid that by checking the code in advance, but if it happens, I'd probably just ask the Manifold admins to reopen the market? (If they're willing to do that for such a silly reason.)

Related questions

© Manifold Markets, Inc.Terms + Mana-only TermsPrivacyRules