Last active
January 12, 2020 12:31
-
-
Save davitai/a70230b894b20a00236c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name SmartMark6 | |
// @namespace SmartMark6 | |
// @description Buy SmartMark6 | |
// @include https://bet.hkjc.com/marksix/single.aspx* | |
// @include https://bet.hkjc.com/marksix/Single_Snowball.aspx* | |
// @require https://ajax.googleapis.com/ajax/libs/jquery/2.2.4/jquery.min.js | |
// ==/UserScript== | |
$("#tips").after('<textarea id="SmartMark6Textarea" rows="6" cols="33" placeholder="SmartMark6Textarea"></textarea>\ | |
<button type="button" onclick="SmartMark6Js()">Buy SmartMark6</button>'); | |
$("#SmartMark6Textarea").val("1) 03, 04, 16, 29, 30, 41\r\n\ | |
2) 04, 10, 20, 22, 30, 35\r\n\ | |
3) 02, 04, 22, 24, 40, 41\r\n\ | |
4) 04, 20, 24, 29, 35, 48\r\n\ | |
5) 02, 03, 04, 05, 20, 21\r\n\ | |
6) 04, 10, 16, 21, 40, 48\r\n\ | |
7) 02, 21, 30, 35, 40, 41\r\n\ | |
8) 05, 16, 20, 24, 30, 40\r\n\ | |
9) 03, 21, 22, 24, 30, 48\r\n\ | |
10) 02, 05, 10, 29, 30, 48\r\n\ | |
11) 05, 10, 21, 24, 29, 41\r\n\ | |
12) 05, 16, 22, 35, 41, 48\r\n\ | |
13) 03, 10, 20, 40, 41, 48\r\n\ | |
14) 02, 03, 10, 16, 24, 35\r\n\ | |
15) 03, 05, 22, 29, 35, 40\r\n\ | |
16) 02, 16, 20, 21, 22, 29\r\n\ | |
17) 12, 13, 17, 19, 32, 49\r\n\ | |
18) 08, 09, 12, 13, 32, 33\r\n\ | |
19) 06, 12, 19, 23, 32, 33\r\n\ | |
20) 06, 09, 13, 17, 23, 32\r\n\ | |
21) 06, 08, 17, 32, 33, 49\r\n\ | |
22) 08, 09, 19, 23, 32, 49\r\n\ | |
23) 06, 08, 12, 13, 23, 49\r\n\ | |
24) 09, 12, 17, 23, 33, 49\r\n\ | |
25) 06, 08, 09, 12, 17, 19\r\n\ | |
26) 06, 09, 13, 19, 33, 49\r\n\ | |
27) 08, 13, 17, 19, 23, 33"); | |
function SmartMark6Js() { | |
var s = $("#SmartMark6Textarea").val(); | |
var n = s.indexOf("\n"); | |
if (n != -1) { | |
s = s.substring(0, n); | |
} | |
var m = s.match(/(\d+)\D+(\d{1,2})\D+(\d{1,2})\D+(\d{1,2})\D+(\d{1,2})\D+(\d{1,2})\D+(\d{1,2})/); | |
if (m != null && m.length == 8) { | |
for (var i = 2; i < 8; ++i) { | |
markSixBallClick($("#n" + parseInt(m[i], 10))[0]); | |
} | |
AddMarkSixToBetSlip(); | |
if (n != -1) { | |
$("#SmartMark6Textarea").val($("#SmartMark6Textarea").val().substring(n + 1)); | |
} else { | |
$("#SmartMark6Textarea").val(""); | |
} | |
} | |
} | |
function embedFunction(s) { | |
document.body.appendChild(document.createElement('script')).innerHTML=s.toString().replace(/([\s\S]*?return;){2}([\s\S]*)}/,'$2'); | |
} | |
embedFunction(SmartMark6Js); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment