tdu_labo_grouping

配置希望状況を見やすくします

目前為 2014-09-29 提交的版本,檢視 最新版本

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

You will need to install an extension such as Tampermonkey to install this script.

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name        tdu_labo_grouping
// @namespace   tdu
// @include     /https?://www\.mlab\.im\.dendai\.ac\.jp/bthesis2015/StudentDeploy\.jsp$/
// @include     /https?://www\.mlab\.im\.dendai\.ac\.jp/bthesis2015/StudentDeploy\.jsp\?displayOrder=0$/
// @description 配置希望状況を見やすくします
// @version     1.1
// @require     http://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js
// @grant       none
// ==/UserScript==

$(function() {
    var $info = null;
    var curren_group = "";
    var num = 0;

    $trs = $('.entry_table tr');
    $trs.splice(0, 1);
    $trs.each(function() {
        var name = $(this).children(':nth-child(3)').html();
        // 切れ目
        if (curren_group != name) {
            if ($info) {
                $info.html(to_info_text(curren_group, num));
                $(this).prev().children('td').css("border-bottom", "dotted 2px");
            }
            $(this).before('<tr class="labo-title"><td colspan="4"></td></tr>');
            $info = $(this).prev();
            num = 0;
            curren_group = name;
        }
        num++;
    });
    $info.html(to_info_text(curren_group, num));
    $(this).prev().children('td').css("border-bottom", "dotted 2px");
});

function to_info_text(name, num) {
    num_max = "山田 柿崎 森本 森谷".indexOf(name) == -1 ? 12 : 2;
    return name + "研: (" + num + "/" + num_max + ")";
}


/*
山田 柿崎 森本 森谷
*/