niejijing / dblp_CCF_enhanced

// ==UserScript==
// @name         dblp_CCF_enhanced
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  mark dblp with CCF ranking enhanced
// @author       njj
// @time         2017.10.06
// @match        http://dblp.uni-trier.de/*
// @grant        none
// ==/UserScript==

function ccfmark(name, tag) {
    var searchtxt = '>' + name + ' ';
    var replacetxt = '<font color=red>'+tag+name+'</font>&nbsp;';
    var kk = document.getElementsByClassName("refine-by venue")[0].getElementsByClassName("add");
    for(var k=0, length=kk.length;k<length;k++){
        var objtext = kk[k].innerHTML;
        var ff = objtext.indexOf(searchtxt);
        if(ff >= 0){
            var pp1 = objtext.indexOf('(', ff);
            var pp2 = objtext.indexOf(')', pp1);
            replacetxt += objtext.substr(pp1, pp2-pp1+1);
            kk[k].innerHTML = '<a href="'+window.location.href+"%20venue%3A"+encodeURI(name)+"%3A"+'" target="njj'+name+'">'+replacetxt+'</a>';
            break;
        }
    }
}
// CCF conference
var confdata = [
    {
        type:'AI',
        A:['AAAI', 'CVPR', 'ICCV', 'ICML', 'IJCAI', 'NIPS', 'ACL'],
        B:['COLT','EMNLP','ECAI','ECCV','ICRA','AIPS','ICCBR','COLING','KR','UAI','AAMAS','PPSN'],
        C:['ACCV','CoNLL','GECCO','ICTAI','ALT','ICANN','FGR','ICDAR','ILP','KSEM','ICONIP','ICPR','ICB','IJCNN','PRICAI','NAACL','BMVC','IROS','AISTATS','ACML']
    },
    {
        type:'DM',
        A:['SIGMOD', 'KDD', 'SIGIR', 'VLDB', 'ICDE'],
        B:['CIKM','PODS','DASFAA','ECML-PKDD','ISWC','ICDM','ICDT','EDBT','CIDR','SDM','WSDM'],
        C:['DEXA','ECIR','WebDB','ER','MDM','SSDBM','WAIM','SSTD','PAKDD','APWeb','WISE','ESWC']
    },
    {
        type:'ARCH',
        A:['ASPLOS', 'FAST', 'CNHPCA', 'MICRO', 'SC', 'USENIX', 'PPOPP'],
        B:['HOT CHIPS','SPAA','PODC','CGO','DAC','DATE','EuroSys','HPDC','ICCD','ICCAD','ICDCS','HiPEAC','SIGMETRICS','ICPP','ICS','IPDPS','FPGA','Performance','LISA','MSST','PACT','RTAS','VEE','CODES+ISSS','ITC','SOCC'],
        C:['CF','NOCS','ASP-DAC','ASAP','CLUSTER','CCGRID','Euro-Par','ETS','FPL','FCCM','GLSVLSI','HPCC','MASCOTS','NPC','ICA3PP','CASES','FPT','HPC','ICPADS','ISCAS','ISLPED','ISPD','Hot Interconnects','VTS','ISPA','SYSTOR','ATS']
    },
    {
        type:'SECU',
        A:['CCS','CRYPTO','EUROCRYPT','S&P','USENIX Security'],
        B:['ACSAC','ASIACRYPT','ESORICS','FSE','NDSS','CSFW','RAID','PKC','DSN','TCC','SRDS','CHES'],
        C:['WiSec','ACM MM&SEC','SACMAT','ASIACCS','DRM','ACNS','ACISP','DFRWS','FC','DIMVA','SEC','IFIP WG 11.9','ISC','ICICS','SecureComm','NSPW','CT-RSA','SOUPS','HotSec','SAC','TrustCom','PAM','PETS','ICDF2C']
    },
    {
        type:'COM',
        A:['MOBICOM','SIGCOMM','INFOCOM'],
        B:['SenSys','CoNEXT','SECON','IPSN','ICNP','MobiHoc','MobiSys','IWQoS','IMC','NOSSDAV','NSDI'],
        C:['ANCS','FORTE','LCN','Globecom','ICC','ICCCN','MASS','P2P','IPCCC','WoWMoM','ISCC','WCNC','Networking','IM','MSWiM','NOMS','HotNets','WASA']
    },
    {
        type:'SE',
        A:['FSE/ESEC','OOPSLA','ICSE','OSDI','PLDI','POPL','SOSP','ASE'],
        B:['ECOOP','ETAPS','FM','ICPC','RE','CAiSE','ICFP','LCTES','MoDELS','CP','ICSOC','ICSME','VMCAI','ICWS','SAS','ISSRE','ISSTA','Middleware','SANER','HotOS','ESEM'],
        C:['PASTE','APLAS','APSEC','COMPSAC','ICECCS','SCAM','ICFEM','TOOLS','PEPM','QRS','SEKE','ICSR','ICWE','SPIN','LOPSTR','TASE','ICST','ATVA','ISPASS','SCC','ICSSP','MSR','REFSQ','WICSA','EASE']
    },
    {
        type:'PURE',
        A:['STOC','FOCS','LICS','CAV'],
        B:['SoCG','SODA','CADE/IJCAR','CCC','ICALP','CONCUR','HSCC','ESA'],
        C:['CSL','FSTTCS','IPCO','RTA','ISAAC','MFCS','STACS','FMCAD','SAT','ICTAC']
    },
    {
        type:'GRAPH',
        A:['ACM MM','SIGGRAPH','IEEE VIS','VR'],
        B:['ICMR','i3D','SCA','DCC','EG','EuroVis','SGP','EGSR','ICME','PG','SPM','ICASSP'],
        C:['CASA','CGI','ISMAR','PacificVis','ICIP','MMM','GMP','PCM','SMI','VRST']
    },
    {
        type:'UBIQ',
        A:['CHI','UbiComp','CSCW'],
        B:['IUI','ITS','UIST','ECSCW','MobileHCI','PERCOM','GROUP'],
        C:['ASSETS','DIS','GI','MobiQuitous','INTERACT','CoopIS','ICMI','IDC','AVI','UIC','DIS','HAPTICS','CSCWD','Collaborate Com']
    },
    {
        type:'CROSS',
        A:['WWW','RTSS'],
        B:['EMSOFT','ISMB','CogSci','RECOMB','BIBM'],
        C:['AMIA','APBC','COSIT','IEEE CLOUD']
    },
];


function CCF() {
    'use strict';
    for(var i in confdata) {
        var tag = confdata[i].type;
        var j = 0;
        for(j in confdata[i].A)
            ccfmark(confdata[i].A[j], tag+'.A.');
        for(j in confdata[i].B)
            ccfmark(confdata[i].B[j], tag+'.B.');
        //for(j in confdata[i].C)
        //    ccfmark(confdata[i].C[j], tag+'.C.');
    }
}

function funcTest(){
    window.setInterval(CCF,6000);
}

window.onload = funcTest;