给谷歌学术增加计算机学报引用格式 2021-07-16 技巧 暂无评论 1406 次阅读 ## 计算机学报的引用格式 1. 把GB/T的 [C]、[J]等方括号去掉 2. 给文献来源统一弄成大写开头 ## 浏览器脚本 1. 浏览器安装 暴力猴 插件 2. 点暴力猴图标,创建新脚本,粘贴以下内容: ``` // ==UserScript== // @name 谷歌学术引用 // @namespace Violentmonkey Scripts // @match https://scholar.google.com/scholar // @grant none // @version 1.1 // @author - // @description 2021/5/28下午10:46:53 // ==/UserScript== String.prototype.format =function () { var args = arguments; return this.replace(/\{(\d+)\}/g, function(m, i){ return args[i]; }); }; window.proutil_title_upper = function(str){ exclude = ['in','on','of','and','arXiv'] words = str.split(' ') for(i in words){ w=words[i] if(exclude.indexOf(w)<0){ w =w.replace(w[0],w[0].toUpperCase()); words[i]=w } } return words.join(' '); } window.proutil_add_cite = function(name,content){ str_html = '{0}{1}'.format (name,content) document.querySelector('#gs_citt > table > tbody').innerHTML += str_html } window.proutil_get_info = function(){ var proutil_int=window.setInterval(function(){ if(document.querySelector('#gs_md_s').className=="gs_vis"){ window.clearInterval(proutil_int) // The Cite window already appears info = document.querySelector('#gs_citt > table > tbody > tr:nth-child(3) > td > div').innerHTML console.log(info) obj = info.match("([^\(]*) ([^\.]*)\.") authors_comma_dot = obj[1] year_brackets = obj[2] source = info.substring(info.indexOf("")).replaceAll("","").replaceAll("","") if(source[source.length-1]=='.') source = source.substring(0,source.length-1) info = info = document.querySelector('#gs_citt > table > tbody > tr:nth-child(2) > td > div').textContent obj = info.match("\"(.*)\"") title = obj[1] if(title[title.length-1]=='.') title = title.substring(0,title.length-1) console.log(authors_comma_dot) console.log(year_brackets) console.log(title) console.log(source) source = window.proutil_title_upper(source) // Increase the max-height of Cite window document.querySelector('#gs_cit-bdy').style['max-height']='600px' // Add a new Cite row splinproc = '{0}: {1}. In: {2} {3}.'.format(authors_comma_dot,title,source,year_brackets) window.proutil_add_cite("splinproc",splinproc) // 中国计算机学报 GBT= document.querySelector('#gs_citt > table > tbody > tr:nth-child(1) > td > div').textContent cjoc_part1 = GBT.match(/(.*)\[.*\](.*)/)[1] cjoc_part2 = GBT.match(/(.*)\[.*\](.*)/)[2] cjoc = '{0}{1}'.format(cjoc_part1,window.proutil_title_upper(cjoc_part2)) window.proutil_add_cite("计算机学报",cjoc) } console.log("tick") },100) } as = document.querySelectorAll('a[title="引用"]') for(i=0;i 标签: none 本作品采用 知识共享署名-相同方式共享 4.0 国际许可协议 进行许可。
评论已关闭