Jump to content

pstein

Members
  • Content count

    50
  • Joined

  • Last visited

Community Reputation

1 Neutral

About pstein

  • Rank
    Newbie
  1. Lets start with an example web page (from german computer magazin): https://www.heise.de/newsticker/meldung/VMware-Workstation-14-braucht-juengere-Prozessoren-3847372.html?view=print When you look at the bottom of this webpage you find a list of link lines. I want to shrink the space gap between each of them. Therefore I applied (afterwards through Greasemonkey) the following CSS statement: pre, code { font-size: 10px !important; line-height: 9px !important; } Reduction of line-height works until 10px (even when the font-size itself is biggger !!!). Specifying a lower value for line-height than 10 does not work any more. Why? How else can I reduce the space gap between the link lines?
  2. In many other programming languages (e.g. Java) there is a function like: ((a < b ) ? "lower" : "greater")? which outputs "lower" if the value of variable a is lower than the value of variable b. Otherwise "greater" Is there a similar function in Javascript? Peter
  3. Assume I want to output something at the bottom of a webpage. The output text should not be assigned to a certain element or tag (if possible). I just want to write something like document.write("<p); Is this possible? If I have to assign it to <body>: What would be the minimum code to achieve this? Peter
  4. Lets start again with a sample web page: http://www.thewindowsclub.com/windows-resource-protection-found-corrupt-files Let the browser give a second to load the web page completely. Then scroll with the browsers vertical scrollbar to the bottom of the page. As you can observe the embedded code somehow detects that the user scrolled to the end and loads+appends additional stuff from webserver. In this case its all the comments from users to the article above. How can I prevent this delayed auto-loading? When the user scrolls to the bottom nothing else should be loaded. Second, related question: How can I tell the web page already at first load time to load all possible stuff at the bottom even if the user did not scroll? Thank you Peter
  5. Lets start with a sample web page: http://www.thewindowsclub.com/windows-resource-protection-found-corrupt-files As you can see the article text contains various blue, clickable Links. When I print the whole page (with Firefox print menu) then all these embedded links got automatically a postfix URL. That means immediately after the link on the printed page appears the underlying URL as text writh round brackets (http://www.thewin............) I want to avoid this for all links. The link tag written in blue should persist but no URLs should be added. How can I do this? I want to add your suggested javascript code to a greasemonkey script and let it do the filtering job at print time. If possible the blue links on the web page(s) should be clickable in the future. If necessary the clickability can be removed Peter
  6. How do I output the current timestamp with a format DD.MM.YYYY HH:MM:SS The web page https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date does not show it (an example). Thank you Peter
  7. Assume I go onto one of the article webpages of this (german) computer magazine e.g. https://www.finanzen100.de/finanznachrichten/wirtschaft/apples-cash-cow-erreicht-apples-iphone-bald-seinen-zenit_H2080354162_435351/?SOURCE=7001002 When I click now on the browsers (e.g.Firefox) "print" menu then not all the stuff is printed but only the "core" article with some print specific CSS definitions. I searched now for a while for the corresponding @media print CSS definitions for the print layout but did not found them. Where are they ? Maybe someone could find them more easily. Thank you Peter
  8. Assume I use a simplified CSS setup like: body { font-family: Merriweather, "Museo", Syncopate, Verdana; } As far as I know the HTML rendering engine searches for the first font family package it can find on the client from the list and uses it for rendering. Now lets say I load the corresponding web page into Firefox: How can I find out which Font package is really currently used at the end (if I cannot identify it by shape/design)? Assume Syncopate is used: What do I have to do to provide the package Merriweather and Museo to the client? How do I put it into the web page as additional resource? Is there a difference to put a font-family package name into double quotes or not? Peter
  9. No. They are the same as in the past
  10. Assume I have 10 different "normal" web pages with an URL http:/www.foobar.com/..... Ok, I could setup 10 bookmarks for all these 10 URLs and click them step by step individually. However I am searching for a more convenient, faster way to view them in 1 (!) browser window. How can I setup a "wrapping" web page which contains (as IFRAMES ???) all these 10 other external web pages? They should be somehow embedded as a sub component. Peter
  11. Assume I have a web page which loocks pretty well for printing. Now when I really click File--->print menu in Firefox the whole page is printed but with big, fat margins around it. Furthermore some (logo) picture replacements take place. I don't want this! I want to print the page just as I can see it right now in browser. I guess there are some hidden "@media print" CSS statements but I cannot find them in Firebug. So is there a way to bypass all further CSS+Javascript modifications after call of window.print()? How do I find out where and why the currently visible layout is changed for print? Peter
  12. I want to insert the current URL at the bottom of a web page (before printing it). Therefore I coded: var address = document.URL; var pane = document.getElementsByTagName('body'); pane.innerHTML = pane.innerHTML + "<br/>" + address; But this doesn't work. The URL is NOT shown. How else can I achieve this? Peter
  13. Assume I have a webpage which has currently NO CSS stylesheet assigned. Instead font definitions are defined as HTML elements like <font size="6" face="Arial">foobar</font> How can I overwrite this definition e.g. by: font-size: 16px; line-height: 18px; font-family: Verdana; This new CSS definition should be assigned to all occurencies of exactly this element (but not e.g. <font size="2" ....>) How can I achieve this? Peter
  14. How to remove "style=" attribute?

    Assume I have a web page which contains multiple elements similar to <span style="font-size: medium;">....</span> How can I remove the "style=" attribute for all the elements? Overwriting with a neutral value and !important would be acceptable as well. The element <span> itself should still persist Peter
  15. How to remove attributes?

    Assume I have the following HTML source code: <img onload="..." ... someotherattr="..." ...> ... </img> How can I remove the two attributes "onload" and/or "someotherattr" but not all other (possibly existing) attributes? Can I put the remove command for the two attributes into one statement or do I have to setup two commands (for one attribute per command)? jQuery can be used if it is simpler Thank you Peter
×