在 Aminer 学者头像旁边添加转跳到 scopus 和 publons 的按钮

Aminer will now have shotcuts for scopus and publons.

  1. // ==UserScript==
  2. // @name 在 Aminer 学者头像旁边添加转跳到 scopus 和 publons 的按钮
  3. // @namespace http://tampermonkey.net/
  4. // @version 1.01
  5. // @description Aminer will now have shotcuts for scopus and publons.
  6. // @author qianjunlang
  7. // @match *.aminer.cn/profile/*
  8. // @icon https://www.aminer.cn/favicon.ico
  9. // @require https://cdn.staticfile.org/jquery/3.3.1/jquery.min.js
  10. // @run-at document-idle
  11. // @compatible edge
  12. // @compatible chrome
  13. // @license MIT
  14. // @grant none
  15. // ==/UserScript==
  16. 'use strict';
  17. function go_dn(elem_name){
  18. for(
  19. let cur_li = $(elem_name) , next_li = cur_li.next();
  20. next_li.length > 0;
  21. next_li = cur_li.next()
  22. ){
  23. next_li.after(cur_li);
  24. }
  25. }
  26. //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  27.  
  28. $(".a-aminer-layouts-footer-footer-footerBg").hide();
  29. go_dn("section.center_part");
  30.  
  31. var mouse_on_effect = {"filter":"drop-shadow(0px 1px 3px #ffffff)", "transition":"0.5s" , "transition-timing-function": "ease-out",};
  32. var mouse_out_effect = {"filter":"drop-shadow(0px 1px 3px #d0d0d0)", "transition":"0.5s", "transition-timing-function": "ease-out",};
  33.  
  34. var rencai_card = ".expert_content";
  35. var rencai_name = $(".expert_content").find(".name").text();
  36. rencai_name = rencai_name.replace(/\((.+?)\)/g,''); // /[\u4e00-\u9fa5]/g
  37.  
  38. //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  39. const scopus_button = document.createElement('button');
  40. scopus_button.className = 'btn btn-sm';
  41. $(scopus_button).css(mouse_out_effect);
  42. scopus_button.onmouseout = function(){
  43. $(scopus_button).css(mouse_out_effect);
  44. }
  45. scopus_button.onmouseover = function(){
  46. $(scopus_button).css(mouse_on_effect);
  47. }
  48. scopus_button.innerHTML = `
  49. <img
  50. src="https://i0.hdslb.com/bfs/article/1010e2e3e7f16664e7862559bd7fb2ac4e7b796d.png"
  51. alt="scopus-logo"
  52. height=`+ parseInt($(".avatar_bottom_line").height()) +`px
  53. />
  54. `;
  55. scopus_button.onclick = function() {
  56. location.href =
  57. "https://www.scopus.com/results/authorNamesList.uri?st1="
  58. + rencai_name.split(' ')[rencai_name.split(' ').length-1]
  59. +"&st2="+ rencai_name.split(' ')[0];
  60. }
  61. $(scopus_button).css({
  62. "z-index": 9999999,
  63. "border":"0",
  64. "background-color":"transparent",
  65. "cursor": "pointer",
  66. "position": "absolute",
  67. "left": parseInt(
  68. $(rencai_card).position().left
  69. + 20
  70. ) +"px",
  71. "top": parseInt(
  72. $(".watermark").position().top
  73. + $(".watermark").height()
  74. - $(".avatar_bottom_line").height()
  75. ) + "px",
  76. });
  77. document.body.append(scopus_button);
  78.  
  79. //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  80.  
  81. const publons_button = document.createElement('button');
  82. publons_button.className = 'btn btn-sm';
  83. $(publons_button).css(mouse_out_effect);
  84. publons_button.onmouseout = function(){
  85. $(publons_button).css(mouse_out_effect);
  86. }
  87. publons_button.onmouseover = function(){
  88. $(publons_button).css(mouse_on_effect);
  89. }
  90. publons_button.innerHTML = `
  91. <img
  92. src="https://i0.hdslb.com/bfs/article/9e55210b1ec2b9a8c713094a11dee9d9ec294334.png"
  93. alt="scopus-logo"
  94. height=`+ parseInt($(".avatar_bottom_line").height() *0.5) +`px
  95. />
  96. `;
  97. publons_button.onclick = function() {
  98. location.href = "https://publons.com/search/?search=" + rencai_name;
  99. }
  100. $(publons_button).css({
  101. "z-index": 9999999,
  102. "border":"0",
  103. "background-color":"transparent",
  104. "cursor": "pointer",
  105. "position": "absolute",
  106. "left": parseInt(
  107. $(rencai_card).position().left
  108. + 20
  109. ) +"px",
  110. "top": parseInt(
  111. $(rencai_card).position().top
  112. + $(".avatar_bottom_line").height()*0.8
  113. ) + "px",
  114. });
  115. document.body.append(publons_button);
  116.  
  117. window.onload = (function() {
  118. $(".watermark").hide();
  119. });

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址