For fun I wrote a little javascript function that will find the first
container for the selected text and will resize it.
(function shrink() {
var sel = window.getSelection().baseNode;
containers = ['DIV','ARTICLE', 'TABLE'];
function getTopNode(node) {
if (node != undefined && containers.indexOf(node.nodeName) < 0) {
return getTopNode(node.parentNode)
} else {
return node;
}
}
var parent = getTopNode(sel);
if (parent) {
parent.style.width="300px";
}
})()
Certainly 300px is too small, but feel free to change.
You can turn it into a bookmarklet using this:
http://ted.mielczarek.org/code/mozilla/bookmarklet.html
Just a toy but demonstrates the concept
To use, you would select part of the text you want resized and click
the bookmarklet. It will find that text's parent and will resize the
parent
On Fri, Nov 1, 2013 at 4:19 PM, Brian Schott <[email protected]> wrote:
> Yes, I looked more closely at the Atlantic Magazine page html. I searched
> for `width=` and found 121 hits. The first one was as follows and I suspect
> it is the key one.
>
> <meta id="meta-viewport" name="viewport" content="width=1024" />
>
> I would not want to adjust the widths of images, for example, btw.
>
> I wonder if a way to handle such html would be by using a tricked out CSS
> page that would cover things like tables and content -- whatever that is --
> instead of some other URL. I think CSS follows a strict hierarchy where the
> nearest CSS instruction overrides more distant ones. But that hierarchy may
> mean that the document itself has the greatest priority, so CSS might not
> work at all.
>
>
> On Fri, Nov 1, 2013 at 4:10 PM, Roger Hui <[email protected]> wrote:
>
>> I don't know enough about Javascript to know whether the following is
>> possible. But something like
>>
>> <html><body>
>> <table width=520 align=center><tr><td>
>> (Some Javascript to "include" the webpage you want to read.)
>> </td></tr></table>
>> </body></html>
>>
>> where "include" does not mean the text of the webpage word for word but a
>> URL that points to it.
>>
>>
> --
> (B=)
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm