// ==UserScript==
// @name ASC Goto Test
// @namespace https://discussions.apple.com/message
// @description This a is test
// @include https://discussions.apple.com/message/*
// @include https://discussions.apple.com/thread/*
// @version 1
// @grant none
// ==/UserScript==
// In case of a serious bug, run in the javascript console on the page you want to change.
//Some debug global variables It must be openned before first debugOut() function
// Copy & Past to Javascript console. Press return to run.
var aDate = new Date();
var debugMode = "";
var debugPass = "";
var newWindow = "";
var debugWindowName = "debug_ASC_CopyGoto.html"
//
// Functions to display debug information in another window.
//
// ------------------------------------------
function startDebug()
{
if (debugMode == "yes")
{
// In debug mode, pass debug mode on.
debugPass = "debug=yes";
newWindow = window.open("",debugWindowName,
"scrollbars=yes,resizable=yes,width=700,height=500");
newWindow.document.writeln(
'');
newWindow.document.writeln(
"");
newWindow.document.writeln(
"
======================================================" + "===================" + "
"); newWindow.document.writeln( "The debug information that follows was generated on " + aDate + "
"); } } // ------------------------------------------ function dumpProperties(obj, obj_name) { var i; // Example invocation & print: DumpProperties(document,'document'); if (debugMode == "yes" ) { debugOut('In DumpProperties. obj=' + obj_name); for (i in obj) { try { debugOut(obj_name + "." + i + " = " + obj[i]); } catch(e) { debugOut("Error writing out structure. Was " + e + " for " + i); } } } } // ------------------------------------------ function debugOut(obj) { if (debugMode == "yes" ) { // Put to debug window var newString = ""; var i; for (i=0;i