ID:2195166
 
Applies to:
Status: Open

Issue hasn't been assigned a status value.
I think the web reference also needs prettyref.js for syntax highlighting. It seems to work mostly well in Dream Maker itself.
please remove prettyref.js from the web reference
it breaks searching for things and makes my life fucking hell
prettyref.js was already fixed to deal with the search problem on the web reference.
how do we search tho.

also going straight to info.html doesn't seem to do syntax highlighting:
http://www.byond.com/docs/ref/info.html
In the Web reference you should be able to search with Ctrl+F. It works just peachy for me.

The reason info.html doesn't get highlighting on its own is that the highlighting can take a bit if it's done on every code snippet, so prettyref.js ignores it. Highlighting is only done on demand: if an individual article is viewed in the DM help window, or if you're viewing an individual article while in the frame mode.
I think Nernum's complaint is that on the page the website links to: http://www.byond.com/docs/ref/index.html, you are unable to see the full reference like before.

It used to display the entirely of info.html and would jump to the anchor'd headers, and you would also be able to ctrl+f thru the whole text. Now, you can only ctrl+f through individual entries. Of course, you can always open info.html by itself.

Maybe, there could be the option of opening info.html from index.html?

Ctrl+F should still find the next entry with that text. If I start from a fresh load and search for some text, it comes up with the first entry that fits.
the full thing loads, but then it removes all the text
ssx is entirely right in what I'm saying

if ctrl-f still functioned properly, then I'm entirely certain that the word "the" would have many more entries pop up
http://i.imgur.com/W6Vu8AQ.png
What browser are you using?
the ever so popular 'google chrome'
Hmm, maybe Chrome is failing here. I'll look into it.
Chrome is a real piece of crap.

I was able to fix part of the problem--Chrome can't actually search text when it's in a div with 0 size and overflow:hidden, so I had to make it 1x1 and offscreen when not shown--but apparently Chrome doesn't select its Find results like a real browser should. I'm trying to figure out how to interact with the Find results so that the appropriate content can be displayed.
You might have to roll your own basic javascript search routine, Chrome's "highlight all" feature is actually common across a few browsers now, but for me it selects the currently found item AND highlights the entire page of results. (But my version is a bit out-dated, they don't support WinXP with the latest)
Chrome isn't doing any proper selection for me; document.getSelection() won't read it. I had to roll a hacky workaround.
Ah yeah, I'm seeing getSelection() fail on the selected find result, I wonder if you should file a report with Google?
Eh. Screw 'em.
The fixed prettyref.js for dealing with Chrome's bucket of fail is live.
Chrome considers it a security flaw if websites or javascript can see browser created changes to websites. so the same system that keeps javascript from reading auto filled in passwords also keeps you from seeing the highlights it does on find, or the link color changes for visited links (another security flaw that used to let people see people's history). It's universal system for making changes to the dom that aren't shown to the javascript.
In response to MrStonedOne
MrStonedOne wrote:
Chrome considers it a security flaw if websites or javascript can see browser created changes to websites. so the same system that keeps javascript from reading auto filled in passwords also keeps you from seeing the highlights it does on find, or the link color changes for visited links (another security flaw that used to let people see people's history). It's universal system for making changes to the dom that aren't shown to the javascript.

I can understand not showing JS the highlights done on find. What I don't understand is why Chrome doesn't properly select the text of the current find so that the selection is readable by JS. That's just wrong.
Page: 1 2