Warning: fopen(/www/sites/update.greasyfork.icu/index/store/temp/8aaa2212fe6e7b72972d8c9e647c03d0.js): failed to open stream: No space left on device in /www/sites/update.greasyfork.icu/index/scriptControl.php on line 65
// ==UserScript== // @name JR Mturk Panda Crazy // @version 0.6.3 // @license GNU GPLv3 // @description Collects panda's for you at a certain cycle instead of timers. Lot of organizing of panda's and grouping them together to start and stop them at once. // @author (JohnnyRS on mturkcrowd.com and mturkgrind.com) johnnyrs@allbyjohn.com // @include http*://worker.mturk.com/?filters[search_term]=pandacrazy=on* // @include http*://worker.mturk.com/requesters/PandaCrazy/projects* // @include http*://worker.mturk.com/?PandaCrazy* // @include http*://worker.mturk.com/?end_signin=1&filters%5Bsearch_term%5D=pandacrazy%3Don* // @require http://code.jquery.com/jquery-2.1.4.min.js // @require http://code.jquery.com/ui/1.11.4/jquery-ui.min.js // @require https://cdnjs.cloudflare.com/ajax/libs/jquery-modal/0.8.0/jquery.modal.min.js // @require https://cdnjs.cloudflare.com/ajax/libs/jquery-layout/1.3.0-rc-30.79/jquery.layout.min.js // @resource jQueryUICSS http://code.jquery.com/ui/1.11.4/themes/pepper-grinder/jquery-ui.css // @resource jQueryModalCSS https://cdnjs.cloudflare.com/ajax/libs/jquery-modal/0.8.0/jquery.modal.min.css // @resource jQueryLayoutCSS https://cdnjs.cloudflare.com/ajax/libs/jquery-layout/1.3.0-rc-30.79/layout-default.css // @connect allbyjohn.com // @connect mturk.com // @connect tiny.cc // @connect ibotta.com // @connect ns4t.net // @grant GM_getValue // @grant GM_setValue // @grant GM_deleteValue // @grant GM_addStyle // @grant GM_xmlhttpRequest // @grant GM_getResourceText // @grant GM_setClipboard // @namespace https://greasyfork.org/users/6406 // @downloadURL https://update.greasyfork.icu/scripts/19168/JR%20Mturk%20Panda%20Crazy.user.js // @updateURL https://update.greasyfork.icu/scripts/19168/JR%20Mturk%20Panda%20Crazy.meta.js // ==/UserScript== var gScriptVersion = "0.6.3"; var gScriptName = "pandacrazy", gScriptID = -1; var gDatabaseVersion = "JRAPR16-1.1-1.1.1"; // JR[Date]-[requesters DB Reset].[Alarms DB reset]-[requesters DB Version].[Options DB Version].[Tabs DB Version] var gLocation = window.location.href, gLastQueueCheck = null, gNumId=0, gQueueCheckinProgress=false, gQueueDelay=[], gNotifications = true, gExtInterval = null; var gSlowDownAuto = true, gDelayedSave = false, gScriptStatus = "normal", gFullQueue = false, gFullQueueTimer = null, gTemplateHitCell = null, gNewSite = false; var gSavedSearchArea = "", gSavedAddUrl = "", gMyLayout = null, gAcceptedLogTab = null, gStatusLogTab = null, gQueueWatchTab = null, gTemplateHitRow = null; var gQueueHelperVersion = "", gQueueHelperFormat2 = false, gSendQueue=false, gMturkDate = "", gJRPOP = null, gAlarmSounded = null; var gMainData = {"hitCollection":{},"displayInfo":"1","accepted":0,"skipped":0,"errors":0,"searched":0,"noHits":0,"fullQueue":0,"orphan":0,"tooFast":0,"tooFastHam":0,"tooFastNormal":0, "savedCycleNum":1,"hitsInQueue":0,"queueStatus":null,"notQual":0,"lastElapsed":0,"jobs":0,"payCounter":0.00,"totalEarnings":0.00,"projectedEarnings":0.00, "missed":0,"captchaCounter":0,"authenticityToken":""}; var gMainMenu = [{"name":"Main","theobject":null}], gNewOldSite = false, gRapidSuppress = {"jobNumber":-1,"counter":0}; var gHitBgColor="#AFEEEE", gFilteredHitBgColor="#D1E5E5", gSearchesHitBgColor="#AED2D2", gButtonOffBgColor="#FFFFF0", gButtonDisabledBgColor="#D3D3D3", gHitMutedColor="#8B4513"; var gBlockedBgColor="#3D3D3D", gTitleColor="#000080", gButtonOffColor="black", gNotQualedBgColor="#DDA0DD", gBlockedColor = "#FFF5EE"; var gHitMutedBorderStyle="dotted", gHitBorderStyle="solid", gHitTextColor="#000000", gHitShortIdColor = "#551A8B"; var gZingOptions = { "0.01":{"SearchGroupAllowed":1,"TallyCountTotalAllowed":0,"MaxProductsSearch":0,"AcceptCodesSearching":false,"MaxReceiptImages":3}, "0.03":{"SearchGroupAllowed":2,"TallyCountTotalAllowed":0,"MaxProductsSearch":2,"AcceptCodesSearching":true,"MaxReceiptImages":3}, "0.05":{"SearchGroupAllowed":3,"TallyCountTotalAllowed":0,"MaxProductsSearch":4,"AcceptCodesSearching":true,"MaxReceiptImages":4}, "0.07":{"SearchGroupAllowed":7,"TallyCountTotalAllowed":0,"MaxProductsSearch":5,"AcceptCodesSearching":true,"MaxReceiptImages":8} }; var gZingFuncOptions = { "1":{"filterName":"Parse Zing Hit Page","functionName":parseZingHitPage} }; var gAlarmSounds = { "less2":{"nameVar":"JR_PANDA_Soundless2","default":"https://www.allbyjohn.com/mturk/sword-hit-01.mp3","audio":null,"desc":"Hits paying less than |: ","payRate":"0.02","lessMinutes":"99","base64":null,"mute":false,"tts":false}, "less2Short":{"nameVar":"JR_PANDA_Soundless2Short","default":"https://www.allbyjohn.com/sounds/mturkscanner/less2Short.mp3","audio":null,"desc":"Hits paying less than | with a short timer less than | minute(s): ","payRate":"0.02","lessMinutes":"2","base64":null,"mute":false,"tts":false}, "less5":{"nameVar":"JR_PANDA_Soundless5","default":"https://www.allbyjohn.com/sounds/mturkscanner/lessthan5.mp3","audio":null,"desc":"Hits paying less than |: ","payRate":"0.05","lessMinutes":"99","base64":null,"mute":false,"tts":false}, "less5Short":{"nameVar":"JR_PANDA_Soundless5Short","default":"https://www.allbyjohn.com/sounds/mturkscanner/lessthan5short.mp3","audio":null,"desc":"Hits paying less than | with a short timer less than | minute(s): ","payRate":"0.05","lessMinutes":"5","base64":null,"mute":false,"tts":false}, "less15":{"nameVar":"JR_PANDA_Soundless15","default":"https://www.allbyjohn.com/sounds/mturkscanner/lessthan15.mp3","audio":null,"desc":"Hits paying less than |: ","payRate":"0.15","lessMinutes":"99","base64":null,"mute":false,"tts":false}, "less15Short":{"nameVar":"JR_PANDA_Soundless15Short","default":"https://www.allbyjohn.com/sounds/mturkscanner/lessthan15Short.mp3","audio":null,"desc":"Hits paying less than | with a short timer less than | minute(s): ","payRate":"0.15","lessMinutes":"8","base64":null,"mute":false,"tts":false}, "less99":{"nameVar":"JR_PANDA_Soundless99","default":"https://www.allbyjohn.com/mturk/higher-alarm.mp3","audio":null,"desc":"Hits paying MORE than |: ","payRate":"0.15","lessMinutes":"99","base64":null,"mute":false,"tts":false}, "fullQueue":{"nameVar":"JR_PANDA_FullQueue","default":"https://www.allbyjohn.com/sounds/Your%20queue%20is%20full%20-%20Paul.mp3","audio":null,"desc":"You have a full queue!","payRate":"","lessMinutes":"99","base64":null,"mute":false,"tts":false}, "queueAlert":{"nameVar":"JR_PANDA_QueueAlert","default":"https://www.allbyjohn.com/sounds/mturkscanner/Ship_Brass_Bell.mp3","audio":null,"desc":"Lowest timed hit in queue is less than || minutes.","payRate":"","lessMinutes":"4","base64":null,"mute":false,"tts":false}, "hasToPause":{"nameVar":"JR_PANDA_hasToPause","default":"https://www.allbyjohn.com/sounds/CrowCawSynthetic.wav","audio":null,"desc":"Logged out or captcha alarm!","payRate":"","lessMinutes":"99","base64":null,"mute":false,"tts":false} }; var gSoundOptions = null, gSoundFile = null, gTabIndex = 0, gMouseDownTimeoutId = null, gPressAndHold = false, gQueueData = [], gQueueCount = {}; var gMuteQueueWatch = false, gGroupings = {}, gGroupingsSort = [], gAlarmObject = null, gGroupingData = null, gHamStart = null; var gDefaultGroupingData = {"JR First":{"theNumber":"0","description":"First grouping by default.","grouping":[],"delayed":[]}}; var gTabsInfo = {}, gTabsData = [], gMainOptions = {}, gExternalData = {}, gScriptHidden = false, gOscillator = null, gSavedTheme = ""; var gDefaultExternalData = {"url":"url","numId":null,"mode":null,"sentPing":false,"gotPong":true,"timeCount":0,"extName":"","extVersion":""}; var gDefaultSoundOptions = {"payRate":"","lessMinutes":"","base64":null,"mute":false,"tts":false}, gRequestersData = {}, gRequestersKeys = []; var gDefaultSearchOptions = {"excludeTerm":[],"includeTerm":[],"minReward":"0.00","historyArray":[],"excludeGID":[],"maxReward":"0.00"}; var gDefaultTabsInfo = {"nextTabNumber":"4","tabCount":"3"}, gOnMac = (navigator.appVersion.indexOf("Mac")!=-1); var gDefaultTabsData = [{"tabName":"Main","tabNumber":"1","positions":null},{"tabName":"Daily Hits","tabNumber":"2","positions":null},{"tabName":"Rare Hits","tabNumber":"3","positions":null}]; var gDefaultMainOptions = {"cycleNumber":1000,"HamCycleNumber":900,"autoSlowDown":true,"cycleAutoIncrease":10,"alarmVolume":80,"cycleIncrease":10,"cycleDecrease":10,"cycleAdding":650, "queueTimer":15000,"hamDelayTimer":8,"showHelpTooltips":true,"cycleNumber2":1400,"cycleNumber3":2100,"disableCaptchaAlert":false,"disableQueueAlert":false, "disableNotifications":false,"debugger":0,"captchaCountText":true,"captchaAt":35,"fastPantha":false,"showAlertNotify":true,"fastSearch":false,"stopAutoSlow":false, "unfocusWarning":true,unfocusDeThrottle:false,themeName:"normal"}; var gJobDataDefault = {"requesterName":"","requesterId":"","groupId":"","pay":"","title":"","duration":"0","hitsAvailable":0,"timeLeft":"","totalSeconds":0,"hitId":"","qual":"", "continueURL":"","returnURL":"","durationParsed":{},"jobNumber":"-1","friendlyRName":"","friendlyTitle":"","assignedOn":"","description":"","keywords":"", "timeData":{},"assignmentId":"","hitSetID":"","secondsOff":-1,"goHam":false,"create":false}; var gDefaultRequestersData = { "0":{"requesterName":gDatabaseVersion,"requesterId":28,"action":gScriptVersion,"groupId":"","pay":"","qual":"","title":"","queueLimit":0,"duration":"0","audioforce":"","dailyLimit":0,"mute":false,"position":null,"tabNumber":"1","once":false,"dailyDone":0,"oneDone":0,"day":"","filterMode":0,"hamTimer":8,"friendlyRName":"","friendlyTitle":"","queueHitLimit":0,"weight":0,"searchData":{"searchOptions":{"excludeTerm":[],"includeTerm":[],"minReward":"0.00","historyArray":[]},"theHistory":{},"excludeGID":[],"maxReward":"0.00"},"dateAdded":null,"stickyDelayedHam":false,"secondsOff":-1,"timeOn":null,"timeOff":null}, "4":{"requesterName":"Ibotta","requesterId":"AGVV5AWLJY7H2","action":"Panda","groupId":"3YVLYSYEBF5EJAO35WSGKPFABSF0QM","pay":"0.01","qual":"ibotta","title":"Are these the same?","queueLimit":0,"duration":"0","audioforce":"less2","dailyLimit":0,"mute":false,"position":null,"tabNumber":"2","once":false,"dailyDone":0,"oneDone":0,"day":"","filterMode":0,"hamTimer":8,"friendlyRName":"","friendlyTitle":"","queueHitLimit":15,"weight":0,"searchData":{"searchOptions":{"excludeTerm":[],"includeTerm":[],"minReward":"0.00","historyArray":[],"excludeGID":[],"maxReward":"0.00"},"theHistory":{}},"dateAdded":null,"stickyDelayedHam":false,"secondsOff":-1,"timeOn":null,"timeOff":null}, "5":{"requesterName":"Ibotta","requesterId":"AGVV5AWLJY7H2","action":"Panda","groupId":"3BH1IVA3VJXE20OLEULG3K8PC6Q1RU","pay":"0.01","qual":"","title":"Are these the same?","queueLimit":0,"duration":"0","audioforce":"less2","dailyLimit":0,"mute":false,"position":null,"tabNumber":"2","once":false,"dailyDone":0,"oneDone":0,"day":"","filterMode":0,"hamTimer":8,"friendlyRName":"","friendlyTitle":"","queueHitLimit":15,"weight":0,"searchData":{"searchOptions":{"excludeTerm":[],"includeTerm":[],"minReward":"0.00","historyArray":[],"excludeGID":[],"maxReward":"0.00"},"theHistory":{}},"dateAdded":null,"stickyDelayedHam":false,"secondsOff":-1,"timeOn":null,"timeOff":null}, "6":{"requesterName":"Ibotta","requesterId":"AGVV5AWLJY7H2","action":"Panda","groupId":"3ZXRRTK2NDCB5NW5M24C9P2OWG41OF","pay":"0.01","qual":"ibotta","title":"Does this receipt contain the following?","queueLimit":0,"duration":"0","audioforce":"less2","dailyLimit":0,"mute":false,"position":null,"tabNumber":"2","once":false,"dailyDone":0,"oneDone":0,"day":"","filterMode":0,"hamTimer":8,"friendlyRName":"","friendlyTitle":"","queueHitLimit":8,"weight":0,"searchData":{"searchOptions":{"excludeTerm":[],"includeTerm":[],"minReward":"0.00","historyArray":[],"excludeGID":[],"maxReward":"0.00"},"theHistory":{}},"dateAdded":null,"stickyDelayedHam":false,"secondsOff":-1,"timeOn":null,"timeOff":null}, "7":{"requesterName":"Ibotta","requesterId":"AGVV5AWLJY7H2","action":"Panda","groupId":"3NYGPW9OTYRQLJTE9DQJQJRQJ2IZPS","pay":"0.01","qual":"","title":"Does this receipt contain the following?","queueLimit":0,"duration":"0","audioforce":"less2","dailyLimit":0,"mute":false,"position":null,"tabNumber":"2","once":false,"dailyDone":0,"oneDone":0,"day":"","filterMode":0,"hamTimer":8,"friendlyRName":"","friendlyTitle":"","queueHitLimit":8,"weight":0,"searchData":{"searchOptions":{"excludeTerm":[],"includeTerm":[],"minReward":"0.00","historyArray":[],"excludeGID":[],"maxReward":"0.00"},"theHistory":{}},"dateAdded":null,"stickyDelayedHam":false,"secondsOff":-1,"timeOn":null,"timeOff":null}, "8":{"requesterName":"Ibotta","requesterId":"AGVV5AWLJY7H2","action":"Panda","groupId":"3R35RPFD7JUTQN8612HRYP7E6LZ1PV","pay":"0.03","qual":"ibotta","title":"Does this receipt contain the following?","queueLimit":0,"duration":"0","audioforce":"less2","dailyLimit":0,"mute":false,"position":null,"tabNumber":"2","once":false,"dailyDone":0,"oneDone":0,"day":"","filterMode":0,"hamTimer":8,"friendlyRName":"","friendlyTitle":"","queueHitLimit":8,"weight":0,"searchData":{"searchOptions":{"excludeTerm":[],"includeTerm":[],"minReward":"0.00","historyArray":[],"excludeGID":[],"maxReward":"0.00"},"theHistory":{}},"dateAdded":null,"stickyDelayedHam":false,"secondsOff":-1,"timeOn":null,"timeOff":null}, "9":{"requesterName":"Ibotta","requesterId":"AGVV5AWLJY7H2","action":"Panda","groupId":"3ZXRRTK2NDCB5NW5M24C9P2OVF61OE","pay":"0.03","qual":"","title":"Does this receipt contain the following?","queueLimit":0,"duration":"0","audioforce":"less2","dailyLimit":0,"mute":false,"position":null,"tabNumber":"2","once":false,"dailyDone":0,"oneDone":0,"day":"","filterMode":0,"hamTimer":8,"friendlyRName":"","friendlyTitle":"","queueHitLimit":8,"weight":0,"searchData":{"searchOptions":{"excludeTerm":[],"includeTerm":[],"minReward":"0.00","historyArray":[],"excludeGID":[],"maxReward":"0.00"},"theHistory":{}},"dateAdded":null,"stickyDelayedHam":false,"secondsOff":-1,"timeOn":null,"timeOff":null}, "10":{"requesterName":"Ibotta","requesterId":"AGVV5AWLJY7H2","action":"Panda","groupId":"3CRC4NO2BIQQWQ3GX0HLFPTFOD30SA","pay":"0.05","qual":"ibotta","title":"Does this receipt contain the","queueLimit":0,"duration":"60 minutes","audioforce":"less2","dailyLimit":0,"mute":false,"position":null,"tabNumber":"2","once":false,"dailyDone":0,"oneDone":0,"day":"","filterMode":0,"hamTimer":8,"friendlyRName":"","friendlyTitle":"","queueHitLimit":12,"weight":0,"searchData":{"searchOptions":{"excludeTerm":[],"includeTerm":[],"minReward":"0.00","historyArray":[],"excludeGID":[],"maxReward":"0.00"},"theHistory":{}},"dateAdded":null,"stickyDelayedHam":false,"secondsOff":-1,"timeOn":null,"timeOff":null}, "11":{"requesterName":"Ibotta","requesterId":"AGVV5AWLJY7H2","action":"Panda","groupId":"3787DLY3Y49RIF1DIJQB3Z8BUNP1T2","pay":"0.05","qual":"","title":"Does this receipt contain the following?","queueLimit":0,"duration":"0","audioforce":"less2","dailyLimit":0,"mute":false,"position":null,"tabNumber":"2","once":false,"dailyDone":0,"oneDone":0,"day":"","filterMode":0,"hamTimer":8,"friendlyRName":"","friendlyTitle":"","queueHitLimit":12,"weight":0,"searchData":{"searchOptions":{"excludeTerm":[],"includeTerm":[],"minReward":"0.00","historyArray":[],"excludeGID":[],"maxReward":"0.00"},"theHistory":{}},"dateAdded":null,"stickyDelayedHam":false,"secondsOff":-1,"timeOn":null,"timeOff":null}, "14":{"requesterName":"MyLikes","requesterId":"A239M0XNXTKQZ7","action":"Panda","groupId":"3YS67JKWJAZLQB11QU6O537NDYZ4X9","pay":"0.01","qual":"","title":"Identify Images with Mature Content","queueLimit":0,"duration":"0","audioforce":"","dailyLimit":0,"mute":false,"position":null,"tabNumber":"1","once":false,"dailyDone":0,"oneDone":0,"day":"","filterMode":0,"hamTimer":8,"friendlyRName":"","friendlyTitle":"","queueHitLimit":0,"weight":0,"searchData":{"searchOptions":{"excludeTerm":[],"includeTerm":[],"minReward":"0.00","historyArray":[],"excludeGID":[],"maxReward":"0.00"},"theHistory":{}},"dateAdded":null,"stickyDelayedHam":false,"secondsOff":-1,"timeOn":null,"timeOff":null}, "15":{"requesterName":"MyLikes","requesterId":"A239M0XNXTKQZ7","action":"Panda","groupId":"3USMLONC9E5D7T4TWRD6UWVBJLN85E","pay":"0.03","qual":"","title":"Identify Images with Mature Content","queueLimit":0,"duration":"0","audioforce":"","dailyLimit":0,"mute":false,"position":null,"tabNumber":"1","once":false,"dailyDone":0,"oneDone":0,"day":"","filterMode":0,"hamTimer":8,"friendlyRName":"","friendlyTitle":"","queueHitLimit":0,"weight":0,"searchData":{"searchOptions":{"excludeTerm":[],"includeTerm":[],"minReward":"0.00","historyArray":[],"excludeGID":[],"maxReward":"0.00"},"theHistory":{}},"dateAdded":null,"stickyDelayedHam":false,"secondsOff":-1,"timeOn":null,"timeOff":null}, "16":{"requesterName":"MyLikes","requesterId":"A239M0XNXTKQZ7","action":"Panda","groupId":"37G59K9AEU0BNMXNCLOH5POEZUC9YI","pay":"0.03","qual":"","title":"Identify Videos with Mature Content","queueLimit":0,"duration":"15 minutes","audioforce":"","dailyLimit":0,"mute":false,"position":null,"tabNumber":"1","once":false,"dailyDone":0,"oneDone":0,"day":"","filterMode":0,"hamTimer":8,"friendlyRName":"","friendlyTitle":"","queueHitLimit":0,"weight":0,"searchData":{"searchOptions":{"excludeTerm":[],"includeTerm":[],"minReward":"0.00","historyArray":[],"excludeGID":[],"maxReward":"0.00"},"theHistory":{}},"dateAdded":null,"stickyDelayedHam":false,"secondsOff":-1,"timeOn":null,"timeOff":null}, "17":{"requesterName":"Steven Snow","requesterId":"A3GAVAUPTHM0B8","action":"Panda","groupId":"3X19M43Z4VULD73G1I2N3GGRYF10D8","pay":"0.06","qual":"","title":"steven snow search 3X..D8","queueLimit":0,"duration":"0","audioforce":"","dailyLimit":0,"mute":false,"position":null,"tabNumber":3,"once":false,"dailyDone":0,"oneDone":0,"day":"","filterMode":0,"hamTimer":8,"friendlyRName":"","friendlyTitle":"","queueHitLimit":0,"weight":0,"searchData":{"searchOptions":{"excludeTerm":[],"includeTerm":[],"minReward":"0.00","historyArray":[],"excludeGID":[],"maxReward":"0.00"},"theHistory":{}},"dateAdded":null,"stickyDelayedHam":false,"secondsOff":-1,"timeOn":null,"timeOff":null}, "18":{"requesterName":"Steven Snow","requesterId":"A3GAVAUPTHM0B8","action":"Panda","groupId":"3TJJ8HSJVIVGSMA3ZXVL0CV5EGV28D","pay":"0.05","qual":"","title":"steven snow url 3T..8D","queueLimit":0,"duration":"0","audioforce":"","dailyLimit":0,"mute":false,"position":null,"tabNumber":"3","once":false,"dailyDone":0,"oneDone":0,"day":"","filterMode":0,"hamTimer":8,"friendlyRName":"","friendlyTitle":"","queueHitLimit":0,"weight":0,"searchData":{"searchOptions":{"excludeTerm":[],"includeTerm":[],"minReward":"0.00","historyArray":[],"excludeGID":[],"maxReward":"0.00"},"theHistory":{}},"dateAdded":null,"stickyDelayedHam":false,"secondsOff":-1,"timeOn":null,"timeOff":null}, "19":{"requesterName":"Venue Quality","requesterId":"A14AT838CPSKA6","action":"Panda","groupId":"3EM4DVSA8U8J6KF08Q5EM8I2NYE308","pay":"0.01","qual":"","title":"locations same","queueLimit":0,"duration":"0","audioforce":"","dailyLimit":0,"mute":false,"position":null,"tabNumber":"1","once":false,"dailyDone":0,"oneDone":0,"day":"","filterMode":0,"hamTimer":8,"friendlyRName":"","friendlyTitle":"","queueHitLimit":0,"weight":0,"searchData":{"searchOptions":{"excludeTerm":[],"includeTerm":[],"minReward":"0.00","historyArray":[],"excludeGID":[],"maxReward":"0.00"},"theHistory":{}},"dateAdded":null,"stickyDelayedHam":false,"secondsOff":-1,"timeOn":null,"timeOff":null}, "20":{"requesterName":"Venue Quality","requesterId":"A14AT838CPSKA6","action":"Panda","groupId":"3D8O2NKTAGFJD90I499E0D26RON13W","pay":"0.01","qual":"","title":"locations adult","queueLimit":0,"duration":"5 minutes","audioforce":"","dailyLimit":0,"mute":false,"position":null,"tabNumber":"1","once":false,"dailyDone":0,"oneDone":0,"day":"","filterMode":0,"hamTimer":8,"friendlyRName":"","friendlyTitle":"","queueHitLimit":0,"weight":0,"searchData":{"searchOptions":{"excludeTerm":[],"includeTerm":[],"minReward":"0.00","historyArray":[],"excludeGID":[],"maxReward":"0.00"},"theHistory":{}},"dateAdded":null,"stickyDelayedHam":false,"secondsOff":-1,"timeOn":null,"timeOff":null}, "21":{"requesterName":"Venue Quality","requesterId":"A14AT838CPSKA6","action":"Panda","groupId":"ZZAWVTYW3Z9ZTAX43ZD0","pay":"0.01","qual":"","title":"locations family","queueLimit":0,"duration":"0","audioforce":"","dailyLimit":0,"mute":false,"position":null,"tabNumber":"1","once":false,"dailyDone":0,"oneDone":0,"day":"","filterMode":0,"hamTimer":8,"friendlyRName":"","friendlyTitle":"","queueHitLimit":0,"weight":0,"searchData":{"searchOptions":{"excludeTerm":[],"includeTerm":[],"minReward":"0.00","historyArray":[],"excludeGID":[],"maxReward":"0.00"},"theHistory":{}},"dateAdded":null,"stickyDelayedHam":false,"secondsOff":-1,"timeOn":null,"timeOff":null}, "23":{"requesterName":"Rob Grady","requesterId":"AM07BBZNC6UTQ","action":"Panda","groupId":"33X7UBO5WUFB78Y5WJ3MVC35LFMU05","pay":"0.03","qual":"","title":"Transcribe Waffle House Guest Check","queueLimit":0,"duration":"5 minutes","audioforce":"","dailyLimit":0,"mute":false,"position":null,"tabNumber":"1","once":false,"dailyDone":0,"oneDone":0,"day":"","filterMode":0,"hamTimer":8,"friendlyRName":"","friendlyTitle":"","queueHitLimit":0,"weight":0,"searchData":{"searchOptions":{"excludeTerm":[],"includeTerm":[],"minReward":"0.00","historyArray":[],"excludeGID":[],"maxReward":"0.00"},"theHistory":{}},"dateAdded":null,"stickyDelayedHam":false,"secondsOff":-1,"timeOn":null,"timeOff":null} }; var gThemes = {"normal":{"controls":{"bg":"#f0f8ff","color":"#191970","color2":"#00ffff","bColor":"#000000"},"main":{"bg":"#FFFFFF"},"center":{"bg":"#eceadf"},"tabs":{"bg":"#ffffff","color":"#453821","colorD":"#000000","bgD":"#f8f7f6","bgA":"#eceadf","colorA":"#4c0101","bgH":"#654b24"},"colorEmp":{"color1":"#ff0000","color2":"#191970"},"cells":{"bColor":"#191970"},"cellButtons":{"colorOff":"#000000","bgOff":"#FFFFF0","bColorOff":"#ff6b6b","colorOn":"#FFFFFF","bgOn":"#008000","bColorOn":"#c71919","bgPaused":"#00a3cc","colorPaused":"#ffffff","bColorPaused":"#ff0000","bgDisable":"#d3d3d3","colorDisable":"#808080","bColorDisable":"#ff0000"},"buttons":{"colorOff":"#000000","bgOff":"#FFFFF0","bColorOff":"#ff0000","colorOn":"#FFFFFF","bgOn":"#008000","bColorOn":"#c71919"},"dialog":{"bg":"#eceadf","color":"#000000","colorA":"#dc2222","bgC1":"#fbf5e6","colorC1":"#000000","bgC2":"#fcf6cf","colorC2":"#000000","bgC3":"#fcf6cf","colorC3":"#000000","bgC4":"#7fffd4","colorC4":"#000000"}},"dark":{"controls":{"bg":"#00485b","color":"#FFFFFF","color2":"cyan","bColor":"#999999"},"main":{"bg":"#000000"},"center":{"bg":"#000000"},"tabs":{"bg":"#1f2a61","color":"#ffffff","colorD":"#d6de97","bgD":"#34396d","bgA":"#5d658c","colorA":"#fafde2","bgH":"#1c1c23"},"colorEmp":{"color1":"#efa2a2","color2":"#fffedc"},"cells":{"bColor":"#8f8fa5"},"cellButtons":{"colorOff":"#050b1b","bgOff":"#ebebff","bColorOff":"#000000","colorOn":"#FFFFFF","bgOn":"#008000","bColorOn":"#58f309","bgPaused":"#0b8eaf","colorPaused":"#ffffff","bColorPaused":"#ff0000","bgDisable":"#d3d3d3","colorDisable":"#808080","bColorDisable":"#ff0000"},"buttons":{"colorOff":"#FFFFFF","bgOff":"#4a4a65","bColorOff":"#c4cedc","colorOn":"#FFFFFF","bgOn":"#008000","bColorOn":"#58f309"},"dialog":{"bg":"#2b2b31","color":"#FFFFFF","colorA":"#16efc8","bgC1":"#0a123a","colorC1":"#cce4dc","bgC2":"#383844","colorC2":"#7fffd4","bgC3":"#179292","colorC3":"#f5f5f5","bgC4":"#028257","colorC4":"#FFFFFF"}}}; var jqUI_CssSrc = GM_getResourceText("jQueryUICSS"), jqUI_ModalSrc = GM_getResourceText("jQueryModalCSS"), jqLayout_CssSrc = GM_getResourceText("jQueryLayoutCSS"); var gAudioContext = window.AudioContext || window.webkitAudioContext, gAudioFixStarted = false, gAudioCtx = new gAudioContext(); function isNumeric(n) { return !isNaN(parseFloat(n)) && isFinite(n); } Date.prototype.stdTimezoneOffset = function() { var jan = new Date(this.getFullYear(), 0, 1), jul = new Date(this.getFullYear(), 6, 1); return Math.max(jan.getTimezoneOffset(), jul.getTimezoneOffset()); }; Date.prototype.dst = function() { return this.getTimezoneOffset() < this.stdTimezoneOffset(); }; function tooltipCreateFix(theElement,theDelay) { $(theElement).tooltip({ show: {delay:theDelay}, close: function () { $(this).tooltip("destroy"); tooltipCreateFix($(this),theDelay); helpToolTips(); } }); } function formatAMPM(theFormat,theDate,theTimeZone) { var d = (theDate) ? theDate : new Date(); if (theTimeZone == "mturk") { var mturkTZOffset = -8, today = new Date(); if (today.dst()) mturkTZOffset++; var utc = d.getTime() + (d.getTimezoneOffset() * 60000), MturkTime = utc + (3600000 * mturkTZOffset); d = new Date(MturkTime); } var minutes = d.getMinutes().toString().length == 1 ? '0'+d.getMinutes() : d.getMinutes(), hours = d.getHours(), ampm = hours >= 12 ? 'pm' : 'am', months = ['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'], days = ['Sun','Mon','Tue','Wed','Thu','Fri','Sat']; hours = (hours>= 12) ? (hours-12) : hours; hours = (hours.toString().length == 1) ? '0'+hours : hours; if (theFormat=="short") return ('0' + (d.getMonth()+1)).slice(-2) + '-' + ('0' + d.getDate()).slice(-2) + '-' + d.getFullYear() + '(' + hours + ':' + minutes + ampm + ')'; else if (theFormat=="dayandtime") return days[d.getDay()] + ' ' + hours + ':' + minutes + ampm; else if (theFormat=="onlydate") return ('0' + (d.getMonth()+1)).slice(-2) + '-' + ('0' + d.getDate()).slice(-2) + '-' + d.getFullYear(); else return days[d.getDay()]+' '+months[d.getMonth()]+' '+d.getDate()+' '+d.getFullYear()+' '+hours+':'+minutes+ampm; } function formatTimeZone(theFormat,theDate,theTimeZone) { return formatAMPM(theFormat,theDate,theTimeZone); } function getTimeLeft(theTime) { if (theTime!==null && theTime!=="") { var tempArray = (theTime.indexOf("second") != -1) ? theTime.split("second")[0].trim().split(" ") : null; var seconds = (tempArray) ? parseInt(tempArray[tempArray.length-1]) : 0; tempArray = (theTime.indexOf("minute") != -1) ? theTime.split("minute")[0].trim().split(" ") : null; var minutes = (tempArray) ? parseInt(tempArray[tempArray.length-1]) : 0; tempArray = (theTime.indexOf("hour") != -1) ? theTime.split("hour")[0].trim().split(" ") : null; var hours = (tempArray) ? parseInt(tempArray[tempArray.length-1]) : 0; tempArray = (theTime.indexOf("day") != -1) ? theTime.split("day")[0].trim().split(" ") : null; var days = (tempArray) ? parseInt(tempArray[tempArray.length-1]) : 0; tempArray = (theTime.indexOf("week") != -1) ? theTime.split("week")[0].trim().split(" ") : null; var weeks = (tempArray) ? parseInt(tempArray[tempArray.length-1]) : 0; return( {"weeks":weeks,"days":days,"hours":hours,"minutes":minutes,"seconds":seconds} ); } else return null; } function formatTimeLeft(resetNow,thisDigit,timeString,lastDigit) { formatTimeLeft.timeFill = formatTimeLeft.timeFill || 0; if (resetNow) formatTimeLeft.timeFill = 0; var missingDigit = (lastDigit!="0" && thisDigit=="0") ? true : false; if (( thisDigit!="0" || missingDigit) && formatTimeLeft.timeFill<2) { formatTimeLeft.timeFill++; if (missingDigit) { return "00 " + timeString + "s"; } else { var addZero = (thisDigit<10) ? ((formatTimeLeft.timeFill==1) ? false : true) : false, plural = (thisDigit==1) ? true : true; return ((addZero) ? "0" : "") + thisDigit + " " + ((plural) ? (timeString+"s") : timeString) + " "; } } else return ""; } function convertToTimeString(timeData) { var returnString = ""; returnString += formatTimeLeft(true,timeData.weeks,"week",false); returnString += formatTimeLeft(false,timeData.days,"day",timeData.weeks); returnString += formatTimeLeft(false,timeData.hours,"hour",timeData.days); returnString += formatTimeLeft(false,timeData.minutes,"minute",timeData.hours); returnString += formatTimeLeft(false,timeData.seconds,"second",timeData.minutes); return returnString.trim(); } function convertTimeToSeconds(timeData) { var totalSeconds = timeData.seconds + ((timeData.minutes) ? (timeData.minutes*60) : 0) + ((timeData.hours) ? (timeData.hours*3600) : 0) + ((timeData.days) ? (timeData.days*86400) : 0) + ((timeData.weeks) ? (timeData.weeks*604800) : 0); return totalSeconds; } function convertSecondsToTimeData(seconds) { var timeData = {}; timeData.weeks = Math.floor(seconds/604800); seconds = seconds - (timeData.weeks*604800); timeData.days = Math.floor(seconds/86400); seconds = seconds - (timeData.days*86400); timeData.hours = Math.floor(seconds/3600); seconds = seconds - (timeData.hours*3600); timeData.minutes = Math.floor(seconds/60); seconds = seconds - (timeData.minutes*60); timeData.seconds = seconds; return timeData; } function convertToSeconds(milliseconds,fixed) { fixed = fixed || 2; var seconds = parseFloat((milliseconds/1000.0 * 100) / 100).toFixed(fixed) + ""; return seconds.replace(/\.0*$/,""); } function convertToMilliseconds(seconds) { if (seconds) return seconds*1000 + ""; else return "0"; } function checkNotifications() { // Let's check if the browser supports notifications if (!("Notification" in window)) return false; else if (Notification.permission === "granted") return true; else if (Notification.permission !== 'denied') { Notification.requestPermission(function (permission) { if (permission === "granted") return true; }); } return false; } function showNotification( title, message, tag, groupId, alertIcon ) { if (gMainOptions.disableNotifications) return; showNotification.tagNumber = showNotification.tagNumber || 0; showNotification.lastGroupID = showNotification.lastGroupID || "0"; if (showNotification.lastGroupID != groupId) showNotification.tagNumber++; showNotification.lastGroupID = groupId; var iconUrl = "https://pandacrazy.allbyjohn.com/mturk/Messaging-Online-icon.png"; if (alertIcon) iconUrl = "https://pandacrazy.allbyjohn.com/mturk/Messaging-Alert-Icon.png"; var n = new Notification(title, { body: message, icon: iconUrl, tag: tag+showNotification.tagNumber}); if (navigator.userAgent.search("Chrome") >= 0) n.onshow = function () { setTimeout(n.close.bind(n), 21000); }; } function parseVersionString (str) { var x = str.split('.'); var maj = parseInt(x[0]) || 0; var min = parseInt(x[1]) || 0; var pat = parseInt(x[2]) || 0; return {"major": maj, "minor": min, "patch": pat}; } function checkVersion(greaterThanVersion,newVersion) { // Check if newVersion is GREATER than the greaterThanVersion var greaterThanVersionObj = parseVersionString(greaterThanVersion), newVersionObj = parseVersionString(newVersion); if (newVersionObj.major > greaterThanVersionObj.major ) return true; else if (greaterThanVersionObj.major==newVersionObj.major) { if (newVersionObj.minor > greaterThanVersionObj.minor) return true; else if (greaterThanVersionObj.minor==newVersionObj.minor && newVersionObj.patch > greaterThanVersionObj.patch) return true; } return false; } // Database using setValue and getValue function defaultFillIn(data,defaultData) { if (!data) return null; for (var key in defaultData) { if (!(key in data)) data[key] = defaultData[key]; } } function convertDatabase(theObject,key) { if (theObject[key].searchData) { if (theObject[key].searchData===null) theObject[key].searchData=setSearchOptionsDefault(); if (!theObject[key].searchData.searchOptions) theObject[key].searchData.searchOptions = JSON.parse(JSON.stringify(gDefaultSearchOptions)); if (!theObject[key].searchData.theHistory ) theObject[key].searchData.theHistory = {}; theObject[key].searchData.searchHistory = null; } if (theObject[key].action===null) theObject[key].action="Panda"; if (theObject[key].action.toLowerCase().indexOf("pantha") != -1) theObject[key].action="Panda"; if (isNumeric(theObject[key].day)) theObject[key].day=""; if (theObject[key].groupId.indexOf("&isSelectedBySearchExperiment=")!=-1) { theObject[key].groupId = theObject[key].groupId.split("&")[0]; } if (theObject[key].hamTimer===null || theObject[key].hamTimer>15 || theObject[key].hamTimer===0) theObject[key].hamTimer=gDefaultMainOptions.hamDelayTimer; } function convertTabDatabase() { if (gTabsData[0].tabName == "Holder") { // temporary for testing computer var newDataBase = []; $.each(gTabsData, function( index, value ) { if (index>0) newDataBase.push(value); }); gTabsData = newDataBase; } } function getBase64Audio(theData) { var base64AudioData = new Uint8Array(theData), i = base64AudioData.length, binaryString = new Array(i); while (i--) { binaryString[i] = String.fromCharCode(base64AudioData[i]); } return(window.btoa(binaryString.join(''))); } function fillInSoundOptions(soundOptions) { for (var key in soundOptions) { gSoundOptions[key].payRate = soundOptions[key].payRate; gSoundOptions[key].lessMinutes = soundOptions[key].lessMinutes; gSoundOptions[key].mute = soundOptions[key].mute; gSoundOptions[key].tts = soundOptions[key].tts; if (soundOptions[key].base64!==null) { gAlarmSounds[key].audio = new Audio("data:audio/wav;base64," + JSON.parse(soundOptions[key].base64)); GM_setValue(gAlarmSounds[key].nameVar,soundOptions[key].base64); } } } function changeOldSettings() { if (gMainOptions.cycleIncrease==5) gMainOptions.cycleIncrease = 10; if (gMainOptions.cycleDecrease==5) gMainOptions.cycleDecrease = 10; if (gMainOptions.hamDelayTimer===null || gMainOptions.hamDelayTimer>15) gMainOptions.hamDelayTimer=gDefaultMainOptions.hamDelayTimer; if (gMainOptions.cycleNumber<650) gMainOptions.cycleNumber=700; if (gMainOptions.cycleNumber2<650) gMainOptions.cycleNumber2=700; if (gMainOptions.cycleNumber3<650) gMainOptions.cycleNumber3=700; if (gMainOptions.HamCycleNumber<650) gMainOptions.HamCycleNumber=700; if (gMainOptions.queueTimer>25000) gMainOptions.queueTimer=15000; } function loadSoundFiles(soundNumber,keyArray,resetMe) { resetMe = (typeof resetMe != 'undefined') ? resetMe : false; if (soundNumber < keyArray.length) { var gotBase64 = (resetMe) ? null : GM_getValue(gAlarmSounds[keyArray[soundNumber]].nameVar,null); loadSoundFiles.firstTime = loadSoundFiles.firstTime || false; if (gotBase64 === null) { if (!loadSoundFiles.firstTime) addToWaitDialog($("#JRjqModalDialog-waiting"),"For your first time this might take a few seconds.
Loading Alarms ",false,"16px"); loadSoundFiles.firstTime = true; requestUrl(gAlarmSounds[keyArray[soundNumber]].default, 0, function(theResult) { addToWaitDialog($("#JRjqModalDialog-waiting")," .",false,"16px"); var base64 = getBase64Audio(theResult.response); GM_setValue(gAlarmSounds[keyArray[soundNumber]].nameVar,JSON.stringify(base64)); gAlarmSounds[keyArray[soundNumber]].audio = new Audio("data:audio/wav;base64," + base64); loadSoundFiles(soundNumber+1,keyArray,resetMe); }, function() { errorRequest(); }, "", "", "arraybuffer"); } else { gAlarmSounds[keyArray[soundNumber]].audio = new Audio("data:audio/wav;base64," + JSON.parse(gotBase64)); loadSoundFiles(soundNumber+1,keyArray,resetMe); } } else { changeOldSettings(); continueLoading(); } defaultFillIn(gSoundOptions[keyArray[soundNumber]],gDefaultSoundOptions); } function fillInGroupings() { for (var key in gGroupingData) { if (!gGroupingData[key].grouping) gGroupingData[key].grouping = []; gGroupings[key] = {"data":gGroupingData[key],"collecting":false}; gGroupingsSort.push(key); defaultFillIn(gGroupingData[key],gDefaultGroupingData["JR First"]); } } function createKeysArray(theObject) { if (!theObject) return null; gRequestersKeys = []; for (var key in theObject) { gRequestersKeys.push(key); } } function loadInDBVersions(passedDatabase) { var tempData = null; if (passedDatabase) tempData = passedDatabase; else { tempData = JSON.parse(GM_getValue("JR_PANDA_RequestersData",JSON.stringify(gDefaultRequestersData))); createKeysArray(tempData); } gRequestersKeys = []; for (var key in tempData) { gRequestersKeys.push(key); convertDatabase(tempData,key); tempData["0"].requesterName = gDatabaseVersion; defaultFillIn(tempData[key],gDefaultRequestersData[0]); defaultFillIn(tempData[key].searchData.searchOptions,JSON.parse(JSON.stringify(gDefaultSearchOptions))); } return tempData; } function setupSoundOptions(base64) { base64 = (typeof base64 != 'undefined') ? base64 : false; var soundOptions = {}; for (var key in gAlarmSounds) { var theBase64 = (base64) ? GM_getValue(gAlarmSounds[key].nameVar,null) : null; defaultFillIn(soundOptions[key],gDefaultSoundOptions); if (gSoundOptions && gSoundOptions[key]) soundOptions[key] = {"payRate":gSoundOptions[key].payRate,"lessMinutes":gSoundOptions[key].lessMinutes,"base64":theBase64, "mute":gSoundOptions[key].mute,"tts":gSoundOptions[key].tts}; else soundOptions[key] = {"payRate":gAlarmSounds[key].payRate,"lessMinutes":gAlarmSounds[key].lessMinutes,"base64":theBase64, "mute":gAlarmSounds[key].mute,"tts":gAlarmSounds[key].tts}; } return soundOptions; } function clearOldMessages() { var storageKeys = Object.keys(localStorage); for (var i = 0; i < storageKeys.length; i++) { if ( (storageKeys[i].substring(0,11) == 'JR_message_' && storageKeys[i].substr(storageKeys[i].length - gScriptName.length) == gScriptName) || storageKeys[i].substring(0,14) == 'JR_queueOrder_') { localStorage.removeItem(storageKeys[i]); } } } function loadSettings() { clearOldMessages(); var defaultSoundOptions = setupSoundOptions(); gRequestersData = loadInDBVersions(); gMainOptions = JSON.parse(GM_getValue("JR_PANDA_MainOptions",JSON.stringify(gDefaultMainOptions))); defaultFillIn(gMainOptions,gDefaultMainOptions); gTabsData = JSON.parse(GM_getValue("JR_PANDA_TabsData",JSON.stringify(gDefaultTabsData))); gTabsInfo = JSON.parse(GM_getValue("JR_PANDA_TabsInfo",JSON.stringify(gDefaultTabsInfo))); convertTabDatabase(); for (var key in gTabsData) { defaultFillIn(gTabsData[key],gDefaultTabsData[0]); } gGroupingData = JSON.parse(GM_getValue("JR_PANDA_GroupingData",JSON.stringify(gDefaultGroupingData))); fillInGroupings(); gSoundOptions = JSON.parse(GM_getValue("JR_PANDA_SoundOptions",JSON.stringify(defaultSoundOptions))); loadSoundFiles(0,Object.keys(gAlarmSounds)); } function saveSettings(doAfter) { GM_setValue("JR_PANDA_RequestersData",JSON.stringify(gRequestersData)); GM_setValue("JR_PANDA_MainOptions",JSON.stringify(gMainOptions)); GM_setValue("JR_PANDA_TabsData",JSON.stringify(gTabsData)); GM_setValue("JR_PANDA_TabsInfo",JSON.stringify(gTabsInfo)); GM_setValue("JR_PANDA_GroupingData",JSON.stringify(gGroupingData)); GM_setValue("JR_PANDA_SoundOptions",JSON.stringify(gSoundOptions)); if (doAfter) setTimeout( function() { doAfter(); },200); gDelayedSave = false; } function resetSettings() { GM_deleteValue("JR_PANDA_RequestersData"); GM_deleteValue("JR_PANDA_MainOptions"); GM_deleteValue("JR_PANDA_TabsData"); GM_deleteValue("JR_PANDA_TabsInfo"); GM_deleteValue("JR_PANDA_GroupingData"); GM_deleteValue("JR_PANDA_SoundOptions"); $.each(gAlarmSounds, function() { GM_deleteValue(this.nameVar); }); } function checkDelayedSave() { if (gDelayedSave) saveSettings(); } // Jquery Creating HTML elements Functions -------- function toggleButton(thisButton,doThisOn,doThisOff,mode,modeStatus,secondsOn) { // dothison = status on function, dothisOff = status off function, mode = status mode to force change to, modestatus = force on or off function var theStatus = $(thisButton).data("status"), doStatus = (typeof modeStatus != 'undefined') ? modeStatus : (theStatus != "on" && theStatus!=mode) ? "on" : "off"; if (mode && theStatus!=mode) $(thisButton).data("status",mode); else $(thisButton).data("status",doStatus); if (doStatus=="on" && doThisOn) doThisOn($(thisButton).data("theNumber"),thisButton,mode); if (doStatus=="off" && doThisOff) doThisOff($(thisButton).data("theNumber"),thisButton,mode); if (typeof secondsOn != 'undefined') $(thisButton).data("secondsOn",secondsOn); updateHitColors($(thisButton).data("theNumber"),thisButton); } function toggleButtonOff(thisButton,doThisOn,doThisOff,passedMode) { $(thisButton).data("status","off"); updateHitColors($(thisButton).data("theNumber"),thisButton); if (doThisOff) doThisOff($(thisButton).data("theNumber"),thisButton,passedMode); } function toggleButtonOn(thisButton,doThisOn,doThisOff) { if ($(thisButton).data("status") == "off") { $(thisButton).data("status","on"); updateHitColors($(thisButton).data("theNumber"),thisButton); if (doThisOn) doThisOn($(thisButton).data("theNumber"),thisButton); } } function checkButtonsStatus() { if (gScriptStatus == "normal") return true; else return false; } function setAttributes(el, attrs) { for (var key in attrs) { el.setAttribute(key, attrs[key]); } } function elementInit(theElement,theClass,theText,theStyle) { if (theClass) theElement.className = theClass; if (theText) theElement.textContent = theText; if (theStyle) theElement.style = theStyle; return theElement; } function createDiv(theHtml) { var inner = (theHtml) ? theHtml : ""; return $('
').html(inner); } function createDiv2(theClass,theText,theStyle) { var div = document.createElement("div"); return elementInit(div,theClass,theText,theStyle); } function createSpan(theHtml) { var inner = (theHtml) ? theHtml : ""; return $('').html(inner); } function createSpan2(theClass,theText,theStyle) { var span = document.createElement("span"); return elementInit(span,theClass,theText,theStyle); } function createTextInput(theValue) { return $("").attr({ "type": "text", "value": theValue }).css({"color":"#000000"}); } function createCheckbox(theValue) { return $("").attr({ "type": "checkbox", "value": theValue }); } function createCheckbox2(theClass,theValue,theStyle) { var cb = document.createElement('input'); cb.type = "checkbox"; if (theValue) cb.value = theValue; return elementInit(cb,theClass,null,theStyle); } function createRadioButton(theName,theValue) { return $("").attr({ "type": "radio", "name": theName, "value": theValue }); } function createLink(theText,theUrl,theTarget,theTitle) { return $('',{text: theText,target: theTarget,title: theTitle,href: theUrl}); } function createLink2(theText,theUrl,theTarget,theTitle) { var aLink = document.createElement("a"); aLink.textContent = theText; aLink.title = theTitle; aLink.href = theUrl; aLink.target = theTarget; aLink.style.color = "#00FFFF"; return aLink; } function createSpanButton(toDo,theClass,theText,theBackgroundColor,theColor,theFontSize,addStyle) { var backgroundColor = (typeof theBackgroundColor != 'undefined') ? theBackgroundColor : "initial"; var textColor = (typeof theColor != 'undefined') ? theColor : "initial", fontSize = (typeof theFontSize != 'undefined') ? theFontSize : "9px"; var theButton = createSpan2("nonselectable " + theClass,theText,"font-size:" + fontSize + "; padding:0px 2px; background-color:" + backgroundColor + "; color:" + textColor + "; border-style:groove; border-width:2px; cursor:default; margin:0px 1px;" + addStyle); setAttributes(theButton,{"data-backgroundColor":backgroundColor,"data-status":"off","data-textColor":textColor,"data-htmltext":theText}); theButton.addEventListener("dblclick", function (e) { e.stopPropagation(); }); if (toDo) theButton.addEventListener("click", function (e) { if (checkButtonsStatus()) {toDo(e);} }); return theButton; } function createDropdownList(className,optionList,cssList,runThis) { var selectList = document.createElement("select"); selectList.classList = className; for (var i = 0,len = optionList.length; i < len; i++) { var option = document.createElement("option"); option.value = optionList[i]; option.text = optionList[i]; selectList.appendChild(option); } selectList.style.cssText = cssList; if (runThis) selectList.onchange = runThis; return selectList; } function createContainer() { var containerDiv = createDiv(); containerDiv.css({"padding-left":"3px", "padding-right":"3px","padding-top":"0px","padding-bottom":"1px"}); return containerDiv; } function createPanels() { var panelContainer = createContainer().attr("id","panelContainer"); return panelContainer; } function createPanel() { var panel = createContainer(); return panel; } function createTabs(isSortable,idName) { var tabList = $("