This looks good, thanks.

The html help source is in repo https://github.com/jsoftware/docs_help .

Originally we planned to continue the html help into j901, but then decided
to freeze it at j807. As a result there were some unused j901 changes in
the repo.

I reverted the repo back to j807, and added your changes which can be seen
in the updated page at https://www.jsoftware.com/help/dictionary/dqco.htm .
After refreshing the browser, there will be a "caution" link at top right.

You can experiment with this using the repo. When all the repo changes are
made, I will update the website.

Note that updating the repo does not automatically update the website.

On Tue, Sep 21, 2021 at 9:00 PM Raul Miller <[email protected]> wrote:

> Ok... this might take a few iterations before we have something we can
> agree on.
>
> As a first draft, I visited
> https://www.jsoftware.com/help/dictionary/dqco.htm in chrome and used
> right click Save As... with Format: Webpage, Complete and saving it
> under the name dqco.htm on my machine.
>
> Then, I went into the resulting dqco_files folder and edited the copy
> of jdoc.css there, adding a line at the bottom:
>
> .caution {float: right}
>
> I also created a javascript file named caution.js in that folder with
> this content:
>
> let firstHR= document.getElementsByTagName('hr')[0];
> let newAnchor= document.createElement('a');
> let newHref= document.createAttribute('href');
> newHref.value= 'https://code.jsoftware.com/wiki/Vocabulary/ObsoleteSyntax
> ';
> newAnchor.setAttributeNode(newHref);
> let newClass= document.createAttribute('class');
> newClass.value= 'caution';
> newAnchor.setAttributeNode(newClass);
> newAnchor.appendChild(document.createTextNode('caution'));
> document.body.insertBefore(newAnchor, firstHR);
>
> Finally, I added to the bottom of my local dqco.htm file as the
> second-to-last line:
>
> <script src="./dqco_files/caution.js" ></script>
>
> This gives me a caution link in the upper right hand corner of that
> page which links to the obsolete syntax page.
>
> Keep in mind that this is only a first draft and some of this would
> obviously have to change before it could be used for real.
>
> Key questions to consider:
>
> (1) Does this look suitable from a user perspective?
>
> (2) Does this procedure look close to plausible from an admin
> perspective? (Would it be preferable to add the corresponding html
> fragment before the first hr? Or is this separation of concerns closer
> to ideal?)
>
> (I was looking at doing this entirely in css, but adding links to html
> documents via css is considered an "exploit" -- javascript is
> considered "more secure" than css.)
>
> (3) How do we decide which pages should get this proposed update?
>
> Thanks,
>
> --
> Raul
>
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to