您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
This will change the appearance of the Popmundo game. It will add values and qualities, change the default check box to true, allow you to filter items, and add global fame to your band
// ==UserScript== // @name BestAppearance for Popmundo // @Author Peter Svendsen (CharId #1662408) // @description This will change the appearance of the Popmundo game. It will add values and qualities, change the default check box to true, allow you to filter items, and add global fame to your band // @version 1.0 // @include https://*.popmundo.com/World/Popmundo.aspx/* // @require https://code.jquery.com/jquery-1.7.1.min.js // @grant GM_info // @namespace https://scriptsppm.000webhostapp.com/ // ==/UserScript== var jisQuery=jQuery.noConflict(),urlCurrent=window.location.href,numCities=49,mediaFame=0,mediaMC=0;function appendJsFile(e){var t=document.createElement("script");t.type="text/javascript",t.src=e,jisQuery("head").append(t)}function canExec(e){return window.location.href.match(e)}function giveCheckboxDefaultTrue(){jisQuery("[id$=chkDelivery]").prop("checked",!0)}function giveSortableTableFoldOption(){jisQuery("table.data.sortable").each(function(){var e=jisQuery(this).attr("id");jisQuery(this).find("th.header").not(".width60").each(function(){var t=' <input type="button" onclick="jQuery(\'#'+e+' tbody\').hide();" value="Hide"> <input type="button" onclick="jQuery(\'#'+e+' tbody\').show();" value="Show">';jisQuery(this).append(t)})})}function giveScoringNumberValues(){jisQuery("a[href*='Scoring']").each(function(){value=jisQuery(this).attr("title"),value=value.substr(0,value.lastIndexOf("/")),value=jisQuery(this).text()+" ("+value+")",jisQuery(this).text(value)})}function giveScoringProgressBarPercentages(){jisQuery('div[class*="rogressBar"]').each(function(){value=jisQuery(this).attr("title"),value=value.substr(0,value.indexOf("%")),span='<span style="text-align: center; font-weight: 400; font-size: smaller;"> '+value+"%</span>",value=jisQuery(this).children("div:first").append(span)})}function giveScoringNegativeProgressBarPercentages(){jisQuery(".plusMinusBar").each(function(){value=jisQuery(this).attr("title"),value=value.substr(0,value.indexOf("%")),span='<span style="text-align: center; font-weight: 400; font-size: smaller;"> '+value+"%</span>",value>=0?jisQuery(this).children("div").eq(1).children().append(span):jisQuery(this).children("div").eq(0).children().append(span)})}function addsGlobalFameMedia(){jisQuery("a[href^='/World/Popmundo.aspx/Help/Scoring/']").each(function(){var e=jisQuery(this).attr("title");e=e.replace("/26",""),mediaFame+=parseInt(e)}),jisQuery("#tablefame div[class$='ProgressBar']").each(function(){var e=jisQuery(this).attr("title");e=e.replace("%",""),mediaMC+=parseInt(e)}),jisQuery("tr:first").after(function(){var e=mediaFame/numCities;e=e.toFixed(2);var t=mediaMC/numCities,a='<tr class="even"><td><b>Global</b></td><td>'+e+'</td><td><div class="greenProgressBar" title="'+(t=t.toFixed(0))+'%"><div class="low" style="width: '+t+'%;"><span style="text-align: center; font-weight: 400; font-size: smaller;"> '+t+"%</span></div></div></td></tr>";jisQuery(this).after(a)})}function AddsTicketPrice(){jisQuery("a[href^='/World/Popmundo.aspx/Help/Scoring/']").each(function(){var e=jisQuery(this).attr("title");switch(e=e.replace("/26",""),parseInt(e)){case 0:case 1:case 2:e="5$";break;case 3:e="7$";break;case 4:e="9$";break;case 5:e="12$";break;case 6:e="15$";break;case 7:e="18$";break;case 8:e="20$";break;case 9:e="25$";break;case 10:e="30$";break;case 11:e="35$";break;case 12:e="40$";break;case 13:e="45$";break;case 14:e="50$";break;case 15:e="65$";break;case 16:e="70$"}jisQuery(this).after('<span style="color: #485663"> '+e+"</span>")})}function getFilterCharacterID(){var e=location.href,t=e.indexOf("#")+1;return-1!=t?e.substring(t):""}function getFilterLocaleBaseURL(){var e=location.href,t=e.lastIndexOf("/World"),a=e.lastIndexOf("#");return a<0?e.substring(t)+"#":e.substring(t,a)+"#"}function addObjectFilterInLocation(){var e="window.location.assign('"+getFilterLocaleBaseURL()+"' + document.getElementById('textFilterID').value); window.location.reload();",t='<tr class="group"><td id="ctl00_cphLeftColumn_ctl00_repItemGroups_ctl01_tdCheckboxFiller"></td><td colspan="2">Filter Items</td></tr><tr class="even hoverable"><td id="ctl00_cphLeftColumn_ctl00_repItemGroups_ctl01_tdCheckboxFiller"></td><td><input type="number" min="1" class="round width100px" style="padding: 3px; border-radius: 7px " id="textFilterID" name="textFilterID" placeholder="Character ID" value="'+getFilterCharacterID()+'"> <input type="button" value="Filter" onclick="'+e+'"></td><td class="right"></td></tr>';jisQuery("#checkedlist thead").append(t)}function filterObjectsInLocation(){jisQuery("#checkedlist tbody tr.hoverable").each(function(){var e=!0;jisQuery(this).find('a[id$="_lnkItemOwner"][href$="'+getFilterCharacterID()+'"]').each(function(){e=!1}),e&&jisQuery(this).hide()})}canExec(/\/World\/Popmundo.aspx\/Character\/OfferItem\/[0-9]*/g)&&giveCheckboxDefaultTrue(),canExec(/\/World\/Popmundo.aspx\/Character\/Recipes\/[0-9]*/g)&&giveSortableTableFoldOption(),giveScoringNumberValues(),giveScoringProgressBarPercentages(),giveScoringNegativeProgressBarPercentages(),canExec(/\/World\/Popmundo.aspx\/Artist\/Popularity\/[0-9]*/g)&&addsGlobalFameMedia(),(canExec(/\/World\/Popmundo.aspx\/Artist\/Popularity\/[0-9]*/g)||canExec(/\/World\/Popmundo.aspx\/Artist\/InviteArtist\/[0-9]*/g))&&AddsTicketPrice(),canExec(/\/World\/Popmundo.aspx\/Locale\/ItemsEquipment\/.*/g)&&addObjectFilterInLocation(),canExec(/\/World\/Popmundo.aspx\/Locale\/ItemsEquipment\/[0-9]*#[0-9]*$/g)&&filterObjectsInLocation();