您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
adds bars to gamefaqs votals screen
当前为
- // ==UserScript==
- // @name Add Bars To GFAQS Votals
- // @namespace http://foolmoron.io
- // @version 0.2
- // @description adds bars to gamefaqs votals screen
- // @author @foolmoron
- // @match http://*.gamefaqs.com/features/bge20_vote
- // @grant none
- // ==/UserScript==
- $(function() {
- BAR_HEIGHT = '20px';
- BORDER_RADIUS = '10px';
- FIRST_COLOR = '#3951C6';
- SECOND_COLOR = '#28398A';
- // kill ugly bars
- $('.battle_results').css('background-image', '')
- // add nice bars
- var detailedResults = $('.detailed_results');
- for (var i = 0; i < detailedResults.length; i++) {
- var detailedResult = detailedResults.eq(i);
- var firstPerc = $('.battle_results', detailedResult.siblings('.battler_box')[0]).text();
- var secondPerc = $('.battle_results', detailedResult.siblings('.battler_box')[1]).text();
- detailedResult.before('\
- <div style="height: ' + BAR_HEIGHT + '; padding: 0px 4px;">\
- <div style="float: right; height: 100%; background-color: ' + SECOND_COLOR + '; width: ' + secondPerc + '; border-top-right-radius: ' + BORDER_RADIUS + '; border-bottom-right-radius: ' + BORDER_RADIUS + '; border-left: 1px solid #ADD8E6;"></div>\
- <div style="float: right; height: 100%; background-color: ' + FIRST_COLOR + '; width: ' + firstPerc + '; border-top-left-radius: ' + BORDER_RADIUS + '; border-bottom-left-radius: ' + BORDER_RADIUS + '; border-right: 1px solid #ADD8E6;"></div>\
- </div>\
- ');
- }
- });