Userfunc() ; still clickable, but doesn't help much
OnMessage(0x112,"WM_SYSCOMMAND") ; not clickable anymore
DllCall("AnimateWindow","UInt",Splash_ID,"Int",1000,"UInt","0x90000") ; not clickable anymore
Yesterday, at some point, all functions were clickable, user and built-in. Built-in functions were correctly linked and user functions were showing a google search. The latter was not really necessary, but it is the only thing that still works at the moment, function-wise, while built-in funcs are not links anymore.
Re: Fixing codeboxes
Posted: 15 Jan 2019, 21:47
by swagfag
only prosilver underlines, and on simplicity they arent clickable at all
Re: Fixing codeboxes
Posted: 15 Jan 2019, 23:44
by gregster
Something else about codeboxes I just discovered:
Inside of spoilers they lack the custom 'Expand View' button... well, this is workable, while not ideal
Run, Notepad.exe, C:\My Documents, max
Run, mailto:[email protected]?subject=This is the subject line&body=This is the message body's text.
Run, ReadMe.doc, , Max UseErrorLevel ; Launch maximized and don't display dialog if it fails.
if ErrorLevel = ERROR
MsgBox The document could not be launched.
RunWait, %ComSpec% /c dir c:\ >>c:\DirTest.txt, , min
Run, c:\DirTest.txt
Run, properties c:\DirTest.txt
Run, http://www.google.com ; i.e. any URL can be launched.
Run, mailto:[email protected] ; This should open the default e-mail application.
Run ::{20d04fe0-3aea-1069-a2d8-08002b30309d} ; Opens the "My Computer" folder.
Run ::{645ff040-5081-101b-9f08-00aa002f954e} ; Opens the Recycle Bin.
; To run multiple commands consecutively, use "&&" between each:
Run, %ComSpec% /c dir /b > C:\list.txt && type C:\list.txt && pause
loop % A_Args.Length() ; points to https://autohotkey.com/docs/commands/StringLen.htm
msgbox % A_Args[A_index]
Between [docs ] tags it is fine, though.
Re: Fixing codeboxes
Posted: 16 Jan 2019, 15:58
by joedf
Weird, for me everything is clickable in simplicity...
and length in codeboxes link to https://www.google.com/search?q=site:au ... rgs.Length
Yes, true I have not added full support for codeboxes in spolier ctrls...
Alright, I'll look into it later tonight.
I've added forced underlining code .token:hover{text-decoration:underline !important;} this also causes other tokens to be underlined also... but I guess that okay.
// linker to docs for prism.js update
// created 7/01/2019 - updated 16/01/2019
// script by joedf
////////////////////////////////////
var redirectQURL = 'https://www.autohotkey.com/docs/redirect.php?topic=';
// get AHK codeboxes
var cboxes = document.querySelectorAll('code.language-autohotkey');
for(var i=0;i<cboxes.length;i++) {
ctokens = cboxes[i].getElementsByClassName('token');
for(var j=0;j<ctokens.length;j++) {
type = ctokens[j].className.replace('token','').trim().toLowerCase();
// supported types: selector, keyword, constant, operator, and variable
if (['selector','keyword','constant','operator','function','builtin'].indexOf(type)>-1) {
ctokens[j].outerHTML = '<a href="'+redirectQURL+ctokens[j].innerHTML+'">'+ctokens[j].outerHTML+'</a>';
} else if (type.indexOf('variable')>-1) {
// same as bove normal rediretor usage but remove the % symbols...
ctokens[j].outerHTML = '<a href="'+redirectQURL+ctokens[j].innerHTML.replace(/%/gi,'')+'">'+ctokens[j].outerHTML+'</a>';
} else if (type.indexOf('important')>-1) {
// same as bove normal rediretor usage but remove the # symbols...
ctokens[j].outerHTML = '<a href="'+redirectQURL+ctokens[j].innerHTML.replace(/#/gi,'')+'">'+ctokens[j].outerHTML+'</a>';
} else {
// do nothing? leave as is...
}
}
}
/* force the underlined link style */
codelinkstyle = document.createElement('style');
codelinkstyle .innerHTML = "code a:hover{text-decoration:underline !important;}";
document.head.appendChild(codelinkstyle);
Help in code boxes still doesn’t work for me. I use prosilver layout.
On my iPad using default Safari web browser it doesn’t work at all.
On my PC it works only once and then not at all until the PC is reloaded. Here I use IE11.
Before the forum software was 'upgraded' it all used to work fine on both platforms.
Yes, okay, but the code boxes seem to use the second, even If i use () behind it - but not a big deal. This is so much better now than directly after the forum software upgrade.
Thank you again for your work on this. I see now underlining and 'Expand view' in spoilers - and built-in functions are working again
Help in code boxes still doesn’t work for me. I use prosilver layout.
On my iPad using default Safari web browser it doesn’t work at all.
On my PC it works only once and then not at all until the PC is reloaded. Here I use IE11.
Before the forum software was 'upgraded' it all used to work fine on both platforms.
Hope you can get to the bottom of this.
Cheers
Thanks for reporting this. I was able to reproduce the links not working. I have tested with IE11 and refreshed a few times. https://www.autohotkey.com/boards/viewt ... 73&style=1
If you try running with the developer tools - console open, do you see any errors?
I get this error for now, which I shall fix when I get home: SCRIPT438: Object doesn't support property or method 'contains'
highlightsolved.js (11,1)
Yes, okay, but the code boxes seem to use the second, even If i use () behind it - but not a big deal. This is so much better now than directly after the forum software upgrade.
Thank you again for your work on this. I see now underlining and 'Expand view' in spoilers - and built-in functions are working again
Okay, it seems like I can use Dllcall() instead of Dllcall too, so I will change builtin function links to have an extra () at the end. Should fix it. I'll try this when I get home.
Re: Fixing codeboxes
Posted: 17 Jan 2019, 16:46
by TAC109
On IE11 I see 'css3114 @font-face failed OpenType embedding permission check. Permission must be installable.' twice when it works the first time. Keyword was underlined with little hand icon. After going back in IE11, hovering over keyword again now has no effect (no underline and no little hand icon).
I also see the 'script438' error.
Nothing happens at all on iPad.
Re: Fixing codeboxes
Posted: 17 Jan 2019, 20:22
by jeeswg
- The url tag used to show the full url, currently it doesn't.
- I've always used the url tag in my posts, so that people can easily copy and paste all the information, with full urls.
- Also, the default quote text has changed:
- Current: 'quote=##### post_id=###### time=########## user_id=##'.
- Original: 'quote=#####'. Thanks.
// linker to docs for prism.js update
// created 7/01/2019 - updated 16/01/2019
// script by joedf
////////////////////////////////////
var redirectQURL = 'https://www.autohotkey.com/docs/redirect.php?topic=';
// get AHK codeboxes
var cboxes = document.querySelectorAll('code.language-autohotkey');
for(var i=0;i<cboxes.length;i++) {
ctokens = cboxes[i].getElementsByClassName('token');
for(var j=0;j<ctokens.length;j++) {
type = ctokens[j].className.replace('token','').trim().toLowerCase();
// supported types: selector, keyword, constant, operator, and variable
if (['selector','keyword','constant','operator','function'].indexOf(type)>-1) {
ctokens[j].outerHTML = '<a href="'+redirectQURL+ctokens[j].innerHTML+'">'+ctokens[j].outerHTML+'</a>';
} else if (type.indexOf('builtin')>-1) {
ctokens[j].outerHTML = '<a href="'+redirectQURL+ctokens[j].innerHTML+'()">'+ctokens[j].outerHTML+'</a>';
} else if (type.indexOf('variable')>-1) {
// same as bove normal rediretor usage but remove the % symbols...
ctokens[j].outerHTML = '<a href="'+redirectQURL+ctokens[j].innerHTML.replace(/%/gi,'')+'">'+ctokens[j].outerHTML+'</a>';
} else if (type.indexOf('important')>-1) {
// same as bove normal rediretor usage but remove the # symbols...
ctokens[j].outerHTML = '<a href="'+redirectQURL+ctokens[j].innerHTML.replace(/#/gi,'')+'">'+ctokens[j].outerHTML+'</a>';
} else {
// do nothing? leave as is...
}
}
}
/* force the underlined link style */
codelinkstyle = document.createElement('style');
codelinkstyle .innerHTML = "code a:hover{text-decoration:underline !important;}";
document.head.appendChild(codelinkstyle);
- The url tag used to show the full url, currently it doesn't.
- I've always used the url tag in my posts, so that people can easily copy and paste all the information, with full urls.
- Also, the default quote text has changed:
- Current: 'quote=##### post_id=###### time=########## user_id=##'.
- Original: 'quote=#####'. Thanks.
Yes, you are correct. Phpbb changed some things... Please open a seperate topic for this. I have too many things in mind. Posting here about this will only confuse me more.
Thanks.
Re: Fixing codeboxes
Posted: 17 Jan 2019, 22:50
by jeeswg
Sure, will do. (I thought of them as codebox issues, but I can see now they're more like post issues.) Thanks.
Some progress on iPad using Safari - some code boxes support help lookup, but others don’t.
Not so good with IE11 - help doesn’t work at all now.
Thank you for report. Okay there was a little compatibility that was fixed. Now, there are not errors... but, the timing is off. If prism.urls.js runs at the very end, everything is okay on IE11.
But when it loads from cache, the timing is messed up.
Re: Fixing codeboxes
Posted: 20 Jan 2019, 21:58
by joedf
Okay, should work now. Tested. Updated and hooks on to timing of Prism.js
// linker to docs for prism.js update
// created 7/01/2019 - updated 20/01/2019
// script by joedf
////////////////////////////////////
var redirectQURL = 'https://www.autohotkey.com/docs/redirect.php?topic=';
// get AHK codeboxes
var cboxes = document.querySelectorAll('code.language-autohotkey');
for(var i=0;i<cboxes.length;i++) {
ctokens = cboxes[i].getElementsByClassName('token');
for(var j=0;j<ctokens.length;j++) {
type = ctokens[j].className.replace('token','').trim().toLowerCase();
// supported types: selector, keyword, constant, operator, and variable
if (['selector','keyword','constant','operator'].indexOf(type)>-1) {
ctokens[j].outerHTML = '<a href="'+redirectQURL+ctokens[j].innerHTML+'">'+ctokens[j].outerHTML+'</a>';
} else if (['builtin','function'].indexOf(type)>-1) {
ctokens[j].outerHTML = '<a href="'+redirectQURL+ctokens[j].innerHTML+'()">'+ctokens[j].outerHTML+'</a>';
} else if (type.indexOf('variable')>-1) {
// same as bove normal rediretor usage but remove the % symbols...
ctokens[j].outerHTML = '<a href="'+redirectQURL+ctokens[j].innerHTML.replace(/%/gi,'')+'">'+ctokens[j].outerHTML+'</a>';
} else if (type.indexOf('important')>-1) {
// same as bove normal rediretor usage but remove the # symbols...
ctokens[j].outerHTML = '<a href="'+redirectQURL+ctokens[j].innerHTML.replace(/#/gi,'')+'">'+ctokens[j].outerHTML+'</a>';
} else {
// do nothing? leave as is...
}
}
}
/* force the underlined link style */
codelinkstyle = document.createElement('style');
codelinkstyle .innerHTML = "code a:hover{text-decoration:underline !important;}";
document.head.appendChild(codelinkstyle);
console.log("prism.urls.js executed.");
Re: Fixing codeboxes
Posted: 22 Jan 2019, 06:46
by DRocks
The code box is nicer than before now.. good job!
Thank you