Auto-edit-ciat_only

Ciat auto edit enabler only for CIAT

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name         Auto-edit-ciat_only
// @version      1.6
// @namespace    www.juniper.net
// @description  Ciat auto edit enabler only for CIAT
// @author       Yan Zhongwen
// @include      http*://*pvs.j*.net/*
// @grant        none
// ==/UserScript==

$(document).ready(function() {
    function rC(nam) {
        var tC = document.cookie.split('; ');
        for (var i = tC.length - 1; i >= 0; i--) {
            var x = tC[i].split('='); 
            if (nam == x[0]) return unescape(x[1]);
        } 
        return '~';
    } 

    function wC(nam,val) {
        document.cookie = nam + '=' + escape(val);
    } 

    function lC(nam,pg) {
        var val = rC(nam); 
        if (val.indexOf('~'+pg+'~') != -1) return false;
        val += pg + '~'; 
        wC(nam,val); 
        return true;
    } 

    function FT(cN) {
        return lC('pWrD4jBo',cN);
    } 
    function thisPage() {
        var page = location.href.substring(location.href.lastIndexOf('\/')+1); 
        pos = page.indexOf('.');
        if (pos > -1) {
            page = page.substr(0,pos);
        } 
        return page;
    }
    if (FT(thisPage())) {
        $("#prDetailEditBtn").click();
    }
    function abc () {
        var isEditButtonClicked = $('#isEditButtonClicked').val();
        if (isEditButtonClicked == "true") {	
            bar = $('.section-hdg');
            $("#section_adv_services_fields").click();
  // click Refer prior recommendation(s)          $("#ciatCustRecEditLbl").click();
            
 //  click External Content         bar[2].click();
            bar[3].click();
 // click Advanced Services(Info)          bar[4].click();
        }
    }
    window.setTimeout(abc,3000);
})