Open main menu
Home
Random
Nearby
Log in
Settings
About Kancolle Wiki
Disclaimers
Kancolle Wiki
Search
Changes
← Older edit
Newer edit →
User:Dragonjet/scripts/FleetReporting-Dev.js
(view source)
Revision as of 09:25, 2 February 2015
56 bytes added
,
9 years ago
m
remove empty fleets
Line 1:
Line 1:
(function($){
(function($){
"use strict";
"use strict";
−
console.log("Fleet Reporting v0.
13
");
+
console.log("Fleet Reporting v0.
14
");
var routes = {};
var routes = {};
Line 15:
Line 15:
$(".FleetReport").each(function(){
$(".FleetReport").each(function(){
thisRoute = $(this).data("route").replace(/\W+/g, "");
thisRoute = $(this).data("route").replace(/\W+/g, "");
+
thisFleet = [];
thisFleet = [];
if($(this).data("ship1").length < 4 && $(this).data("ship1").length > 0){ thisFleet.push($(this).data("ship1")); }
if($(this).data("ship1").length < 4 && $(this).data("ship1").length > 0){ thisFleet.push($(this).data("ship1")); }
Line 22:
Line 23:
if($(this).data("ship5").length < 4 && $(this).data("ship5").length > 0){ thisFleet.push($(this).data("ship5")); }
if($(this).data("ship5").length < 4 && $(this).data("ship5").length > 0){ thisFleet.push($(this).data("ship5")); }
if($(this).data("ship6").length < 4 && $(this).data("ship6").length > 0){ thisFleet.push($(this).data("ship6")); }
if($(this).data("ship6").length < 4 && $(this).data("ship6").length > 0){ thisFleet.push($(this).data("ship6")); }
+
if(thisFleet.length==0) return true;
+
thisFleet.sort();
thisFleet.sort();
+
fleetIndexer = thisFleet.join("-");
fleetIndexer = thisFleet.join("-");
if(typeof routes[thisRoute] == "undefined"){
if(typeof routes[thisRoute] == "undefined"){
Dragonjet
15
edits