Code golf: Will someone post <=200 characters of Javascript code that I can use to resolve this market to YES?
Basic
7
Ṁ789
resolved Jan 5
Resolved
YES

Post Javascript code in the market comments. I will run each piece of code that's 200 characters or less in my JS console on this page. 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.

Each person gets one attempt.

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

Alright, that was fast. Took less than an hour. Here's a harder version: /IsaacKing/code-golf-will-someone-post-165-cha

Solved at https://manifold.markets/citrinitas/can-i-write-javascript

Was gonna try to extract a bounty but I don't think I could make enough for that to be worth it


f=(a,b,c)=>setTimeout(()=>{Array.from(document.getElementsByTagName('button')).filter((y)=>y.innerText==a)[b].click()},c);

f("YES", 1, 0);

f("Resolve", 0, 100);

f("Resolve to YES", 0, 200);

predictedYES

thought it'd be more fun to golf a http request but you need to grab an Authorization from somewhere

@citrinitas And here I was wasting characters trying to use three calls to document.querySelector()

Great job!

@citrinitas Well done! Can you do better?

predictedNO

That was supposed to be an embed to https://manifold.markets/IsaacKing/code-golf-will-someone-post-165-cha, not sure why it's not showing up.

predictedNO

@citrinitas What do you mean by "extract a bounty"?

@IsaacKing "I've got a YES solution. Will post it if someone manalinks me M$100"

What browser are you using?

predictedYES

Hmm. Should I answer this? I'm undecided how hard I want to make it on people.

fetch('https://manifold.markets/api/v0/market/AIJOXyIbqnRxcEWdHkO0/resolve', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({outcome: 'YES'}) })

@ZZZZZZ 185 characters, just under the limit. Sadly, did not work.

Will you use your API key?

@cos D'oh, nevermind, just read the description.

Related questions

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