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

Sequel to Code golf: Will someone post <=70 characters of Javascript code that I can use to resolve this market to YES?YES

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
to start trading!

🏅 Top traders

#NameTotal profit
1Ṁ29
2Ṁ16
3Ṁ13
4Ṁ3


Sort by:
predictedYES 2y

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 2y
  1. i=0;setInterval(b=>b(".font-md").at(-[4,6,2,1][i++]).click(),9,$$)

predictedYES 2y

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

predictedYES 2y

@levifinkelstein How many characters is this?

predictedYES 2y

@A 66

predictedYES 2y

@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 2y

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

predictedYES 2y
predictedYES 2y

@IsaacKing did you try the code?

predictedYES 2y

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

predictedYES 2y

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

predictedYES 2y

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

predictedYES 2y

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

predictedYES 2y

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

predictedYES 2y
predictedYES 2y

@IsaacKing what are your 4 first buttons then?

predictedYES 2y

@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 2y

@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 2y

@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 2y

@IsaacKing good point

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

2y

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

What is this?

What is Manifold?
Manifold is the world's largest social prediction market.
Get accurate real-time odds on politics, tech, sports, and more.
Or create your own play-money betting market on any question you care about.
Are our predictions accurate?
Yes! Manifold is very well calibrated, with forecasts on average within 4 percentage points of the true probability. Our probabilities are created by users buying and selling shares of a market.
In the 2022 US midterm elections, we outperformed all other prediction market platforms and were in line with FiveThirtyEight’s performance. Many people who don't like betting still use Manifold to get reliable news.
ṀWhy use play money?
Mana (Ṁ) is the play-money currency used to bet on Manifold. It cannot be converted to cash. All users start with Ṁ1,000 for free.
Play money means it's much easier for anyone anywhere in the world to get started and try out forecasting without any risk. It also means there's more freedom to create and bet on any type of question.
© Manifold Markets, Inc.Terms + Mana-only TermsPrivacyRules