Chat Full Profile Linker *OLD*

Opens a user's full profile by right-clicking on their name

  1. // ==UserScript==
  2. // @name Chat Full Profile Linker *OLD*
  3. // @namespace tag://kongregate
  4. // @description Opens a user's full profile by right-clicking on their name
  5. // @include http://www.kongregate.com/games/*
  6. // @author MrSpontaneous
  7. // @version 1.2
  8. // @date 01/05/2010
  9. // ==/UserScript==
  10. // You cannot modify or redistribute this script without permission.
  11.  
  12. // Updated 03/22/2011 - added support for Firefox 4
  13. // Updated 01/05/2010 - added support for the new version of Ventero's framework.
  14.  
  15. var dom = (typeof unsafeWindow === "undefined"?window:unsafeWindow);
  16.  
  17.  
  18. function init_fullprofile(){
  19. CDialogue = dom.ChatDialogue;
  20. if (CDialogue){
  21. CDialogue.prototype = dom.CDprototype||dom.ChatDialogue.prototype;
  22. CDialogue.prototype.base_initialize = CDialogue.prototype.initialize;
  23. CDialogue.prototype.initialize = function(parent_node, onInputFunction, holodeck, user_manager) {
  24. this.base_initialize(parent_node, onInputFunction, holodeck, user_manager);
  25. var mwn = this._message_window_node.wrappedJSObject || this._message_window_node;
  26. mwn.observe('contextmenu',
  27. function(event) {
  28. if (event.target) {
  29. var username = event.target.getAttribute('username');
  30. if(username){
  31. event.preventDefault();
  32. window.open('http://www.kongregate.com/accounts/'+username,'_blank');
  33. }
  34. }
  35. }
  36. );
  37. };
  38. }
  39. }
  40.  
  41. function check(){
  42. var injectScript = dom.injectScript||(document.getElementById("injectScriptDiv")?document.getElementById("injectScriptDiv").onclick():0);
  43. if(dom.injectScript){
  44. dom.injectScript(init_fullprofile, 1000);
  45. } else if(!dom._promptedFramework && !/Chrome/i.test(navigator.appVersion)){
  46. if(confirm("You don't have the latest version of the framework-script!\n" +
  47. "Please install it, otherwise the scripts won't work.\n" +
  48. "Clicking ok will open a new tab where you can install the script"))
  49. window.open("http://userscripts.org/scripts/show/54245", "_blank");
  50. dom._promptedFramework = true;
  51. }
  52. }
  53.  
  54.  
  55. setTimeout(check, 0);

QingJ © 2025

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