Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // PrimeDice3 - Hotkeys
- // By: paradocks
- // CTRL + SHIFT + J
- // Paste in Dev Console + Press enter
- // Edit the values in quotes (bet, multiplybet(x2), dividebet(/2)) to suite your needs
- var bet, doublebet, halfbet, setbasebet, basebet, diceiconcolor;
- bet = '1'; // ex. bet on 1 key
- doublebet = '2'; // ex. double on 2
- half = '3'; // ex. half on 3
- setbasebet = '4'; // setbase on 4
- // Change Color of Dice Icon
- diceiconcolor = "black";
- basebet = prompt("What would you like your basebet to be?", "0.00000000");
- if (basebet > 0) {
- $('.hero__main input:first').val(basebet).change();
- alert('To change the value again, click the dice icon above "2x","1/2"&"Max"');
- }
- //jQuery HotKeys Lib
- !function(e){function t(t){if("string"==typeof t.data&&(t.data={keys:t.data}),t.data&&t.data.keys&&"string"==typeof t.data.keys){var a=t.handler,s=t.data.keys.toLowerCase().split(" ");t.handler=function(t){if(this===t.target||!(/textarea|select/i.test(t.target.nodeName)||e.hotkeys.options.filterTextInputs&&e.inArray(t.target.type,e.hotkeys.textAcceptingInputTypes)>-1)){var r="keypress"!==t.type&&e.hotkeys.specialKeys[t.which],i=String.fromCharCode(t.which).toLowerCase(),n="",o={};e.each(["alt","ctrl","shift"],function(e,a){t[a+"Key"]&&r!==a&&(n+=a+"+")}),t.metaKey&&!t.ctrlKey&&"meta"!==r&&(n+="meta+"),t.metaKey&&"meta"!==r&&n.indexOf("alt+ctrl+shift+")>-1&&(n=n.replace("alt+ctrl+shift+","hyper+")),r?o[n+r]=!0:(o[n+i]=!0,o[n+e.hotkeys.shiftNums[i]]=!0,"shift+"===n&&(o[e.hotkeys.shiftNums[i]]=!0));for(var f=0,c=s.length;c>f;f++)if(o[s[f]])return a.apply(this,arguments)}}}}e.hotkeys={version:"0.8",specialKeys:{8:"backspace",9:"tab",10:"return",13:"return",16:"shift",17:"ctrl",18:"alt",19:"pause",20:"capslock",27:"esc",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"insert",46:"del",59:";",61:"=",96:"0",97:"1",98:"2",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9",106:"*",107:"+",109:"-",110:".",111:"/",112:"f1",113:"f2",114:"f3",115:"f4",116:"f5",117:"f6",118:"f7",119:"f8",120:"f9",121:"f10",122:"f11",123:"f12",144:"numlock",145:"scroll",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},shiftNums:{"`":"~",1:"!",2:"@",3:"#",4:"$",5:"%",6:"^",7:"&",8:"*",9:"(",0:")","-":"_","=":"+",";":": ","'":'"',",":"<",".":">","/":"?","\\":"|"},textAcceptingInputTypes:["text","password","number","email","url","range","date","month","week","time","datetime","datetime-local","search","color","tel"],options:{filterTextInputs:!0}},e.each(["keydown","keyup","keypress"],function(){e.event.special[this]={add:t}})}(jQuery||this.jQuery||window.jQuery);
- // Disable Scrolldown on Space
- window.onkeydown = function(e) {
- if ($('.input--chat').is(":focus")) {
- } else {
- return !(e.keyCode == 32);
- }
- };
- // Bet
- $(document).bind('keydown', bet, function(e) {
- if ($('.input--chat').is(":focus")) {
- } else {
- $('#spinner').click();
- }
- });
- // Double Bet
- $(document).bind('keydown', doublebet, function(e) {
- if ($('.input--chat').is(":focus")) {
- } else {
- $('.hero__main button:nth-child(2):first').click();
- }
- });
- // Half Bet
- $(document).bind('keydown', half, function(e) {
- if ($('.input--chat').is(":focus")) {
- } else {
- $('.hero__main button:nth-child(1):first').click();
- }
- });
- // Half Bet
- $(document).bind('keydown', setbasebet, function(e) {
- if ($('.input--chat').is(":focus")) {
- } else {
- $('.hero__main input:first').val(basebet).change();
- }
- });
- $('.icon--dice').click(function() {
- basebet = prompt("What would you like your basebet to be?", "0.00000000");
- if (basebet > 0) {
- $('.hero__main input:first').val(basebet).change();
- alert('To change the value again, click the dice icon that is above 2x, 1/2, and Max');
- }
- });
- $('div.hero > div > div > div:nth-child(2) > div > div.hero__ornament.is-small--hidden > span > i').css("color", diceiconcolor);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement