MediaWiki:Common.js: Difference between revisions

From Ylvapedia
Jump to navigation Jump to search
m (JP traits added)
m (Jp フレーズ)
Line 6: Line 6:
     // Define the values for red and green text
     // Define the values for red and green text
     var redValues = ["Dry", "Fairy-sized", "Dead", "Stinky", "Boring", "Lacks Firmness", "Crunchy", "Bitter", "Tarnished", "Bland","Hollow", "Coarse", "Rustic", "Dull Color", "Harmful Substance","Soggy","Squishy", "Tasteless", "Sandy", "Ugly","Dangerous","Hallucinogenic","Cat", "Poison Mix","毒物混入", "パサパサ","妖精サイズ","死んでいる","くさい","つまらない","コシがない","苦い","不格好","カチカチ","淡白","すかすか","無骨","曇った色","有害物質","ふにゃふにゃ"," 退屈","ざらざら","危険","幻覚作用","猫","媚薬混入","退屈"];
     var redValues = ["Dry", "Fairy-sized", "Dead", "Stinky", "Boring", "Lacks Firmness", "Crunchy", "Bitter", "Tarnished", "Bland","Hollow", "Coarse", "Rustic", "Dull Color", "Harmful Substance","Soggy","Squishy", "Tasteless", "Sandy", "Ugly","Dangerous","Hallucinogenic","Cat", "Poison Mix","毒物混入", "パサパサ","妖精サイズ","死んでいる","くさい","つまらない","コシがない","苦い","不格好","カチカチ","淡白","すかすか","無骨","曇った色","有害物質","ふにゃふにゃ"," 退屈","ざらざら","危険","幻覚作用","猫","媚薬混入","退屈"];
   var greenValues = ["Common Quality","Fair Quality", "Fine Quality","Premium Quality","Royal Quality","Slightly Moist", "Moist", "Fatty", "Juicy", "Bursting with Juice","Bursting", "Pumpkin-sized", "Putit-sized", "Monster-sized", "Mammoth-sized", "Titan-sized","Almost Moving", "Moving", "Lively", "Very Lively","Alive","Faint Aroma", "Pleasant Smell", "Fragrant", "Highly Fragrant", "Heavenly Scent","Slightly Unusual","Unusual", "Rare", "Super Rare","Ultra Rare", "Slightly Firm", "Stretchy", "Chewy","Infinitely Stretchy", "Resilient","Slightly Sweet", "Sweet", "Clearly Sweet", "Extremely Sweet", "Sugar Bomb", "Concerning", "Eye-Catching", "Cute", "Beautiful", "Creepy Cute", "Collagen Rich", "Creamy", "Mellow", "Thick", "Velvety","Somewhat Dense", "Dense", "Very Dense", "Concentrated", "Ultra Concentrated","Rich", "Slightly Rough", "Rough", "Delicate", "Extremely Delicate","Utterly Delicate","Pale Color", "Colorful", "Bright", "Vivid", "Trace Vitamins", "Small Vitamins", "Moderate Vitamins", "Large Vitamins","Abundant Vitamins", "Treasure Trove Vitamins", "Flaky", "Crispy", "Very Crispy", "Snappy", "Somewhat Spicy", "Spicy", "Very Spicy", "Extremely Spicy", "Intensely Spicy","Slightly Glossy","Glossy", "Bright", "Shiny", "Lustrous", "Bewitchingly Shiny","Rainbow Color","Fatten Up","Slim Down","Never Decay","Bug Mix","Adam","普通の出来","まあまあの出来","良い出来","高級品","極上品","しっとり","てかてか","脂たっぷり","ジューシー","じゅわっと溢れる脂","プチサイズ","かぼちゃサイズ","お化けサイズ","マンモスサイズ","巨人サイズ","動きそう","動く","活きがいい","ピチピチ","生きている","ほのかな香り","いい匂い","かぐわしい","香り高い","天上の香り","少し珍しい","珍しい","レア","スーパーレア","ウルトラレア","少しコシがある","粘り強い","もちもち","伸びる","どこまでも伸びる","ほんのり甘い","甘い","はっきり甘い","激甘","砂糖爆弾","少し気になる","気になる","綺麗","かわいい","きもかわいい","コラーゲン豊富","独特の味","クリーミー","まろやか","濃厚","こくまろ","ちょっとぎっしり","ぎっしり","みっちり","パンパン","超特濃縮","おおざっぱ","華奢","繊細","非常に繊細","極めて繊細","薄い色","カラフル","鮮やか","鮮烈","万色","ビタミン微量","ビタミン少量","ビタミン中量","ビタミン大量","ビタミンの宝庫","ポリポリ","シャキシャキ","サクサク","ザクザク","カリカリ","やや刺激的","刺激的","スパイシー","とてもスパイシー","恐ろしくスパイシー","僅かな光沢","つるつる","つやつや","艶やか","魅惑の光沢","太る","痩せる","腐らない","蟲混入","アダム","濃縮","ビタミン豊富"];
   var greenValues = ["Common Quality","Fair Quality", "Fine Quality","Premium Quality","Royal Quality","Slightly Moist", "Moist", "Fatty", "Juicy", "Bursting with Juice","Bursting", "Pumpkin-sized", "Putit-sized", "Monster-sized", "Mammoth-sized", "Titan-sized","Almost Moving", "Moving", "Lively", "Very Lively","Alive","Faint Aroma", "Pleasant Smell", "Fragrant", "Highly Fragrant", "Heavenly Scent","Slightly Unusual","Unusual", "Rare", "Super Rare","Ultra Rare", "Slightly Firm", "Stretchy", "Chewy","Infinitely Stretchy", "Resilient","Slightly Sweet", "Sweet", "Clearly Sweet", "Extremely Sweet", "Sugar Bomb", "Concerning", "Eye-Catching", "Cute", "Beautiful", "Creepy Cute", "Collagen Rich", "Creamy", "Mellow", "Thick", "Velvety","Somewhat Dense", "Dense", "Very Dense", "Concentrated", "Ultra Concentrated","Rich", "Slightly Rough", "Rough", "Delicate", "Extremely Delicate","Utterly Delicate","Pale Color", "Colorful", "Bright", "Vivid", "Trace Vitamins", "Small Vitamins", "Moderate Vitamins", "Large Vitamins","Abundant Vitamins", "Treasure Trove Vitamins", "Flaky", "Crispy", "Very Crispy", "Snappy", "Somewhat Spicy", "Spicy", "Very Spicy", "Extremely Spicy", "Intensely Spicy","Slightly Glossy","Glossy", "Bright", "Shiny", "Lustrous", "Bewitchingly Shiny","Rainbow Color","Fatten Up","Slim Down","Never Decay","Bug Mix","Adam","普通の出来","まあまあの出来","良い出来","高級品","極上品","しっとり","てかてか","脂たっぷり","ジューシー","じゅわっと溢れる脂","プチサイズ","かぼちゃサイズ","お化けサイズ","マンモスサイズ","巨人サイズ","動きそう","動く","活きがいい","ピチピチ","生きている","ほのかな香り","いい匂い","かぐわしい","香り高い","天上の香り","少し珍しい","珍しい","レア","スーパーレア","ウルトラレア","少しコシがある","粘り強い","もちもち","伸びる","どこまでも伸びる","ほんのり甘い","甘い","はっきり甘い","激甘","砂糖爆弾","少し気になる","気になる","綺麗","かわいい","きもかわいい","コラーゲン豊富","独特の味","クリーミー","まろやか","濃厚","こくまろ","ちょっとぎっしり","ぎっしり","みっちり","パンパン","超特濃縮","おおざっぱ","華奢","繊細","非常に繊細","極めて繊細","薄い色","カラフル","鮮やか","鮮烈","万色","ビタミン微量","ビタミン少量","ビタミン中量","ビタミン大量","ビタミンの宝庫","ポリポリ","シャキシャキ","サクサク","ザクザク","カリカリ","やや刺激的","刺激的","スパイシー","とてもスパイシー","恐ろしくスパイシー","僅かな光沢","つるつる","つやつや","艶やか","魅惑の光沢","太る","痩せる","腐らない","蟲混入","アダム","濃縮","ビタミン豊富","腐りにくい"];
var tealValues = ["Human Flesh", "Tainted","人肉","不浄"];
var tealValues = ["Human Flesh", "Tainted","人肉","不浄"];
     // Loop through each Food table cell in wikitable
     // Loop through each Food table cell in wikitable
Line 33: Line 33:
$(document).ready(function () {
$(document).ready(function () {
     // Define the values for blue, red and green text
     // Define the values for blue, red and green text
   var tealValues = ["can cut", "can mine", "can fish"];
   var tealValues = ["can cut", "can mine", "can fish","ことができる"];
   var blueValues = ["Faction","ファクション"];
   var blueValues = ["Faction", "のものだ","ファクション"];
   var redValues = ["decreases", "sucks", "accelerates", "curses","エーテル病の進行を早める","呪われている","揚げる","呪わてる"];
   var redValues = ["decreases", "sucks", "accelerates", "curses","呪われる","下げる","エーテル病の進行を早める","揚げる",];
var greenValues = ["increases", "grants you", "float", "enhances", "better", "additional", "easier", "sustains", "slows the process of decay","inflicts massive","triggers","negates","reduces","prevents","see invisible","returns to your hand.","protects you from thieves.","digest rotten","absolute piercing","protects you from mutation.","strengthens","上昇させる","耐性を授ける","発動する","強化する","維持する","腕を上げる","に対して絶大な威力を発揮する","追加ダメージを与える","機会を増やす","手元に戻ってくる","浮遊させる","盗まれなくする","変異から保護する","敵の弱点の発見を容易にする","透明なものを見ることを可能にする"
var greenValues = ["increases", "grants you", "float", "enhances", "better", "additional", "easier", "sustains", "slows the process of decay","inflicts massive","triggers","negates","reduces","prevents","see invisible","returns to your hand.","protects you from thieves.","digest rotten","absolute piercing","protects you from mutation.","strengthens","消化させる","可能にさせる","可能にする","容易にする","無効にする","防ぐ","保護する","あげる","深める","振るわれる","上昇させる","耐性を授ける","発動する","強化する","維持する","に対して絶大な威力を発揮する","追加ダメージを与える","機会を増やす","手元に戻ってくる","浮遊させる","盗まれなくする",
];
];



Revision as of 15:53, 11 July 2024

/* Any JavaScript here will be loaded for all users on every page load. */
importScript('MediaWiki:jquery.js');


$(document).ready(function () {
    // Define the values for red and green text
    var redValues = ["Dry", "Fairy-sized", "Dead", "Stinky", "Boring", "Lacks Firmness", "Crunchy", "Bitter", "Tarnished", "Bland","Hollow", "Coarse", "Rustic", "Dull Color", "Harmful Substance","Soggy","Squishy", "Tasteless", "Sandy", "Ugly","Dangerous","Hallucinogenic","Cat", "Poison Mix","毒物混入", "パサパサ","妖精サイズ","死んでいる","くさい","つまらない","コシがない","苦い","不格好","カチカチ","淡白","すかすか","無骨","曇った色","有害物質","ふにゃふにゃ","	退屈","ざらざら","危険","幻覚作用","猫","媚薬混入","退屈"];
   var greenValues = ["Common Quality","Fair Quality", "Fine Quality","Premium Quality","Royal Quality","Slightly Moist", "Moist", "Fatty", "Juicy", "Bursting with Juice","Bursting", "Pumpkin-sized", "Putit-sized", "Monster-sized", "Mammoth-sized", "Titan-sized","Almost Moving", "Moving", "Lively", "Very Lively","Alive","Faint Aroma", "Pleasant Smell", "Fragrant", "Highly Fragrant", "Heavenly Scent","Slightly Unusual","Unusual", "Rare", "Super Rare","Ultra Rare", "Slightly Firm", "Stretchy", "Chewy","Infinitely Stretchy", "Resilient","Slightly Sweet", "Sweet", "Clearly Sweet", "Extremely Sweet", "Sugar Bomb", "Concerning", "Eye-Catching", "Cute", "Beautiful", "Creepy Cute", "Collagen Rich", "Creamy", "Mellow", "Thick", "Velvety","Somewhat Dense", "Dense", "Very Dense", "Concentrated", "Ultra Concentrated","Rich", "Slightly Rough", "Rough", "Delicate", "Extremely Delicate","Utterly Delicate","Pale Color", "Colorful", "Bright", "Vivid", "Trace Vitamins", "Small Vitamins", "Moderate Vitamins", "Large Vitamins","Abundant Vitamins", "Treasure Trove Vitamins", "Flaky", "Crispy", "Very Crispy", "Snappy", "Somewhat Spicy", "Spicy", "Very Spicy", "Extremely Spicy", "Intensely Spicy","Slightly Glossy","Glossy", "Bright", "Shiny", "Lustrous", "Bewitchingly Shiny","Rainbow Color","Fatten Up","Slim Down","Never Decay","Bug Mix","Adam","普通の出来","まあまあの出来","良い出来","高級品","極上品","しっとり","てかてか","脂たっぷり","ジューシー","じゅわっと溢れる脂","プチサイズ","かぼちゃサイズ","お化けサイズ","マンモスサイズ","巨人サイズ","動きそう","動く","活きがいい","ピチピチ","生きている","ほのかな香り","いい匂い","かぐわしい","香り高い","天上の香り","少し珍しい","珍しい","レア","スーパーレア","ウルトラレア","少しコシがある","粘り強い","もちもち","伸びる","どこまでも伸びる","ほんのり甘い","甘い","はっきり甘い","激甘","砂糖爆弾","少し気になる","気になる","綺麗","かわいい","きもかわいい","コラーゲン豊富","独特の味","クリーミー","まろやか","濃厚","こくまろ","ちょっとぎっしり","ぎっしり","みっちり","パンパン","超特濃縮","おおざっぱ","華奢","繊細","非常に繊細","極めて繊細","薄い色","カラフル","鮮やか","鮮烈","万色","ビタミン微量","ビタミン少量","ビタミン中量","ビタミン大量","ビタミンの宝庫","ポリポリ","シャキシャキ","サクサク","ザクザク","カリカリ","やや刺激的","刺激的","スパイシー","とてもスパイシー","恐ろしくスパイシー","僅かな光沢","つるつる","つやつや","艶やか","魅惑の光沢","太る","痩せる","腐らない","蟲混入","アダム","濃縮","ビタミン豊富","腐りにくい"];
	var tealValues = ["Human Flesh", "Tainted","人肉","不浄"];
    // Loop through each Food table cell in wikitable
    $('.Food td').each(function () {
        var cellText = $(this).text().trim();

        // Check if cell text is exactly equal to any redValues
        if (redValues.includes(cellText)) {
            $(this).css('color', 'red');
        }

        // Check if cell text is exactly equal to any greenValues
        if (greenValues.includes(cellText)) {
            $(this).css('color', 'green');
        }
        
        // Check if cell text is exactly equal to any tealValues
        if (tealValues.includes(cellText)) {
            $(this).css('color', 'steelblue');
        }
    });
});

	// Script for auto coloration of text in equipment tables
	
$(document).ready(function () {
    // Define the values for blue, red and green text
   var tealValues = ["can cut", "can mine", "can fish","ことができる"];
   var blueValues = ["Faction", "のものだ","ファクション"];
   var redValues = ["decreases", "sucks", "accelerates", "curses","呪われる","下げる","エーテル病の進行を早める","揚げる",];
var greenValues = ["increases", "grants you", "float", "enhances", "better", "additional", "easier", "sustains", "slows the process of decay","inflicts massive","triggers","negates","reduces","prevents","see invisible","returns to your hand.","protects you from thieves.","digest rotten","absolute piercing","protects you from mutation.","strengthens","消化させる","可能にさせる","可能にする","容易にする","無効にする","防ぐ","保護する","あげる","深める","振るわれる","上昇させる","耐性を授ける","発動する","強化する","維持する","に対して絶大な威力を発揮する","追加ダメージを与える","機会を増やす","手元に戻ってくる","浮遊させる","盗まれなくする",
];

    // Loop through each Equipment wikitable cell
    $('.Equipment td').each(function () {
        var cellText = $(this).text().trim();

        // Check if cell text contains tealValues 
        if (tealValues.some(function (value) {
            return cellText.indexOf(value) !== -1;
        })) {
            $(this).css('color', 'steelblue');
        }
        // Check if cell text contains redValues 
        if (redValues.some(function (value) {
            return cellText.indexOf(value) !== -1;
        })) {
            $(this).css('color', 'red');
        }

        // Check if cell text contains greenValues 
        if (greenValues.some(function (value) {
            return cellText.indexOf(value) !== -1;
        })) {
            $(this).css('color', 'green');
        }
                   // Check if cell text contains blueValues 
        if (blueValues.some(function (value) {
            return cellText.indexOf(value) !== -1;
        })) {
            $(this).css('color', 'Blue');
        }
    });
});