Show HN: I wrote a bookmarklet to know any Twitter poll result without your vote
And here&#x27;s the code if anyone is interested in how it works:<p><pre><code>    javascript:!function(){if(&#x27;https:&#x2F;&#x2F;twitter.com&#x27;!==window.location.origin||4!==window.location.pathname.split(&#x27;&#x2F;&#x27;).length)return alert(&#x27;This is not a valid Twitter poll!&#x27;);alert(&#x27;Please wait this can take up to 30 seconds. Select OK or close to get started. If this is a valid poll, you will get the result when it is ready...:)&#x27;);let t=&#x27;&#x27;,e=!1,o=window.XMLHttpRequest.prototype.open;const i=Date.now();window.XMLHttpRequest.prototype.open=function(){if(e)return o.apply(this,arguments);function n(){try{if(this.responseURL.includes(&#x27;poll&#x27;)){const e=JSON.parse(this.responseText).card.binding_values,o=Object.keys(e).reduce(function(t,o){if(o.includes(&#x27;_label&#x27;)){const i=e[o].string_value,n=o.replace(&#x2F;\D&#x2F;g,&#x27;&#x27;),s=e[`choice${n}_count`].string_value;t.choiceVoteCountMap[i]=+s,t.noOfVotes+=+s}return t},{noOfVotes:0,choiceVoteCountMap:{}}),{choiceVoteCountMap:i,noOfVotes:n}=o;Object.keys(i).forEach(function(e){t+=`${e}: ${(i[e]&#x2F;n*100).toFixed(2)}%\n`})}}catch(t){e=!0,window.confirm(&#x27;Something went wrong. Could you please report the issue?&#x27;)&amp;&amp;window.open(&#x27;https:&#x2F;&#x2F;www.syncwithtech.org&#x2F;twitter-poll-result-wo-voting&#x2F;&#x27;,&#x27;_blank&#x27;),this.removeEventListener(&#x27;load&#x27;,n)}}return this.addEventListener(&#x27;load&#x27;,n),t&amp;&amp;(e=!0,alert(t),this.removeEventListener(&#x27;load&#x27;,n)),Date.now()-i&gt;4e4&amp;&amp;!e&amp;&amp;(e=!0,window.confirm(&#x27;Seems like it is not a valid Twitter poll. Press OK to report the issue if it is a valid poll and the bookmarklet failed to detect it.&#x27;)&amp;&amp;window.open(&#x27;https:&#x2F;&#x2F;www.syncwithtech.org&#x2F;twitter-poll-result-wo-voting&#x2F;&#x27;,&#x27;_blank&#x27;),this.removeEventListener(&#x27;load&#x27;,n)),o.apply(this,arguments)}}();</code></pre>