Window Title Changer (Autoloop/CSA)

Changes the window title for autoloop and csa to something relevant

您需要先安装一个扩展,例如 篡改猴Greasemonkey暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴Userscripts ,之后才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。

您需要先安装用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name         Window Title Changer (Autoloop/CSA)
// @namespace    http://tampermonkey.net/
// @version      1.0
// @description  Changes the window title for autoloop and csa to something relevant 
// @author       [email protected]
// @include      *autoloop.us*
// @grant        none
// @icon
// ==/UserScript==
'use strict';

//¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦
//Window Title Changer
//¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦
//autoloop
//works, but is changing the title to the link for some reason
if (window.location.href.includes('autoloop.us/DMS/App/')) {
    document.title = (document.title).split('-')[1];
}

//csa store + product
if (window.location.href.includes('csa.autoloop.us/CustomerProduct/')) {
    var store = ($('#page_canvas > h1 > a:nth-child(2)').text()); //$('#page_canvas > h1 > a:nth-child(2)').text();
    var product = ($('#page_canvas > h1').text());
    product = product.split(':');
    document.title = product[1] + ' - ' + store;

    //csa main store page
} else if (window.location.href.includes('csa.autoloop.us/Customer/')) {
    var storee = ($('#page_canvas > h1').text());
    storee = storee.split('(');
    document.title = storee[0];
}