Jump to content

pstein

Members
  • Posts

    130
  • Joined

  • Last visited

Everything posted by pstein

  1. At first the the sample page (of german ebay). But I guess its a problem of ALL ebay auctions which are not finished yet: http://www.ebay.de/itm/Huawei-E3372h-Mobile-150Mbps-Cat4-LTE-4G-3G-USB-Modem-Surfstick-SIM-Lock-FREI-/322073237147?hash=item4afd0f969b:g:INcAAOSwiylXBomt I want to get rid of the ad-strip in the mid with the label "Käufer haben sich auch folgende Artikel angesehen" The corresponding element looks like: < div id="merch_html_100005">....</div> I want to hide this stuff and setup a GreaseMonkey script with the following statement: GM_addStyle("#merch_html_100005 { display: none !important; }"); ,,,but it didn't work. The inserted advertising pane does not vanish. It seems to me that it is protected by javascript. Or loaded with delay of a couple of seconds. So how else can I remove it? With Javascript/jQuery or CSS?
  2. Assume I have an element like: <div class="aaa" myattribute="foobar1111" .....>....</a> The classname "aaa" is unique. 1.) How can I replace "foobar1111" completely (!) by "dummy2222" from javascript/jQuery? 2.) How can I replace ONLY "1111" inside the attribute by "2222" AND keep the remaining (possible unknown) text inside the attribute value whatever it is? If it is more comfortable jQuery could be used. Peter
  3. @dsonesuk: Hmm I don't understand your answer. I asked neither for the meaning of the data() function nor for the usage of "href". I asked why user "musicman" wrote $("#div1") and not $("div.aaa")
  4. Sometimes I need to post some code from a file into a posting textarea here. This is NOT possible in InternetExplorer v11 (under 64bit Win 7). I have always start Firefox to do this. w3schools forum is almost the only forum where I have to use another browser. Why does the psoting form not accept pasting from clipboard? I used: - Ctrl+C - there icons in the editor pane - enabled "compatibily view" in IntExp. Nothing works. I guess its an error in the posting procedure from w3schools. Please setup a useful editor. Thank you Peter
  5. Sometimes I want to get the full source code of a web page. When I mean "full" I mean really FULL including the imported CSS stylesheets at the top. So I don't want to see just the import statement like: @import "/assets/css/aaaa.css"; But the real expanded stuff inside the "aaaa.css" file. I tried to do this with the Firefox extension "Firebug" but found no option. Is there another another tool or way to get the full, expanded CSS stylesheet? Peter
  6. I have here an longer web page from an inhouse web server which cannot be printed onto multiple physical pages. Instead it is cut after the first page. All remaining pages are empty. I wonder what could cause this problem. The page does not have a "print" button or link. Instead I use the print function from Firefox (on Win7). It does not have a "@media print" section in CSS. Looking into the HTML code I could imagine the following causes. Statements like: 1.) *, *::before, *::after { box-sizing: border-box; } 2.) vertical-align: bottom; 3.) outline: 0 none; 4.) background: transparent none repeat scroll 0 0; 5.) border: 0 none; Everything else looks good. Any idea what causes the no page-break? Peter
  7. The jQuery code from "dsonesuk" works but for possible future use I would like to investigate the "Data" solution from musicman as well. However it seems to me that it is not correct. Where does "#div1" come from? Shouldn't it be: $("div.aaa").data("href","#222"); ? Thank you Peter
  8. Assume I have an element defintion like: <div class="aaa" href="#222" .....>.....</div> Unfortunately there exist dozends of <div> element all with the same class. The unique identifier for the target element is the attribute href=.... So in order to refer to the specifc element I have to use a command like var div = document.getElementByHref("#222"); Unfortunately this command does not exist. How else can I fetch excatly this element? If necessary I can use jQuery, maybe with a statement similar to var div = $(div.href="#222"); I don't know if this works Peter
  9. @justsomeguy: Thank you for the answer. But: What excatly is a click handler? The element in focus looks like: <i class="ieon-expand accordion-icon pull-right"></i> What is the corresponding click handler? How do I execute such a click method from JavaScript? Peter
  10. Lets start with a (german) sample webpage which shows some data information: https://www.wikifolio.com/de/de/wikifolio/futecus Now when user click on a "+" sign right of one of the grey bars in the mid (e.g. right of "Aktuelles Portfolio") then the content inside this section is expanded. Unfortunately I cannot tell the webpage to always automatically expand this section when it is loaded. So I need some javascript/CSS/jQuery statements in a Greasemonkey script to emulation/simulate such a mouse click. Have a look at the following snapshot of Firebug inside Firefox: http://postimg.org/image/mlcjwdnh7/ You can see yellow hightlighted parameters which change when users click on the "+" and toogle expansion status. How can I emulate/simulate these changes (=a mouse click) with Javascript/CSS? Peter
  11. Assume I have the following code: < div class"foobar"> .... <a class="aaa" .....> .... </a> .... < /div> Now I want to completely replace the <a> element (including child stuff) by another. I have no access to the original html code but want to modify it afterwards by Greasemonkey script. However the following does not work: var address = document.URL; var div = document.getElementsByClassName("foobar.aaa")[0]; div = "<a href=\"" + address + "\">" + address + "</a>"; How else does that work? Peter
  12. When I open new topics in forums then the checkbox "Follow this topic" is currently always unchecked by default. How can I let the forum software automatically check this checkbox? When I look into my forum notification settings then there are a lot of confusing options. I miss an option "notify me upon answers to topics I opened". What is the appropriate setting? Peter
  13. When I try to print out a certain webpage (in out LAN server) into PDF then the long, long text is printed only on ONE page. Since the text does not fit onto ONE page it is simply cut in the mid e.g. after line 83. Line 84 is visible only the upper half. So no page break is inserted. I suspect the CSS statement display: inline-block as being guilty for that. Can this be? How do I neutralize the "display" statement? Does display: inline; allow page breaks? Peter
  14. Assume I want to get the content/Value of the following (inner) element (and move it later into another element): < aside id="parent"> < p class=" aaa bbb ccc"> ...... </p> < /aside> then the following code does not work: var pane = document.getElementsByClass("aaa bbb ccc")[0]; var target = document.getElementsByClass("foobar")[0]; target = pane.innerHTML; The following does not work as well: var pane = document.getElementsByClass("aaa.bbb.ccc")[0]; var target = document.getElementsByClass("foobar")[0]; target = pane.innerHTML; So how else should I code this? Peter
  15. Lets start at first with a sample page (it is in german but it doesn't matter): http://deutsche-wirtschafts-nachrichten.de/2015/09/03/wettlauf-um-rohstoffe-usa-wollen-arktis-flotte-ausbauen/ When you look at it then always at the top middle-right side you find a "printer" icon. When you click on it the content of the article is send to an often-used external online service called "printfriendly". This external site receives the CSS specs together with the core text, then prepares a layout, print it as a *.pdf file and let it download by the initiating user. The problem is that I don't like the default print layout. I prefer e.g. a (much) smaller font and a smaller line-height. So I am searching for the print-related (!) CSS statements which are responsible for the print-layout. Later I want to modify them by Javascript or jQuery through e.g. Greasemonkey. But this is another step. At first I want to identify the CSS statement in the original web page which are later send to "printfriendly". Can someone point my to the css-layout-script (statements)? Thank ypu Peter
  16. Assume I have HTML code similar to <div ...>....</div><hr><div ...>....</div>or <p>....</p><br><p>....</p> As you can see there are single <hr> or <br> elements with some leading or trailing whitespaces but no further textaround them.How can I delete them (including the leading/trailing whitespaces) but not the <div> resp. <p> elements before and after?Peter
  17. Assume I have a (simplified) HTML code like: <div id="myid"> <div id="mysubid" class="aaa"> ... </div> <div id="mysubid" class="bbb"> ... </div> <div id="mysubid"> ... <div id="mysubsubid">....</div> </div></div> Now I want to apply a CSS to all siblings with the id "mysubid" but which have NOT a class attribute (here=the last one).if this is not possible: Maybe I can asisgn a CSS to all subelements which have an id=mysubid but NOT have an embedded <div with id=mysubsubid">Thank youPeter
  18. @justsomeguy: thank you for your suggestion but this exactly does NOT work: As you can see in my sample code above the text "this stuff should be removed" IS NOT a sibling of the two previous <span> elements. It is NOT enclosed by a <span> tag. So I cannot search for a "nextsibling". Beside this I would need a "findlastsibling" function which does NOT exist. If you have another suggestion (if possible with code) let me know. thank you Peter
  19. An often occuring problem is how to remove stuff after a certain element up to the end of the enclosing element. This removal should be done by javascript/CSS code since I do not have access to the original HTML code which comes from the server. Example: ... <p> <span class="uniqueaaa">...</span> ... <span class="uniquebbb">...</span> this stuff should be removed resp. hidden </p> This text should be kept .... How can I achieve this with javascript/CSS ? Thank you
  20. Assume I have the following HTML code: ... <div> aaa .... <div> bbb ... <div> ... ccc .... </div> ... </div> ... </div> ... As you can see the there are three nested <div>...</div> elements. Now I want to hide/delete with JavaScript only the directly wrapping <div> element which contains the pattern "ccc". If I code now $("div:contains('ccc')").css("display", "none"); then ALL <div> elements are hidden because all conatins more or less the pattern "ccc". How can I hide/delete only the inner most <div>so that only the following HTML code remains: ... <div> aaa .... <div> bbb ... </div> ... </div> ... Keep in mind that in other cases there could be only 2 or even 5 <div> hierarchy levels.
  21. Assume I have a HTML table like <table> ... </table> 1.) How can I define CSS for the table so that the inner grid lines are printed as well? 2.) How can I define CSS for the table so that the table is NOT split on two pages when printed? If the table does not fit on one page it should start on top of the next print (pdf) page. Peter
  22. Assume I have a web page which contains at multiple places in the applied CSS style sheets a"box-shadow"CSS feature/property In certain situations I want to disable this CSS property temporarily but completely without changing the original generating procedures. So I am think about applying another "last" CSS style sheet which overrides globally current CSS settings and which allow me to disable box-shadow in all elements on the current page. Is this possible? How excatly? Something like * { box-shadow: none !important; }Peter
  23. Assume I have the following html:<div id="aaa"> <p id="bbb">...</p> <p id="ccc">...</p> ...text outside of a p.... <p id="ddd">...</p> <p>...</p> <p style="...">...</p></div>How can I assign a CSS style to all <p> without an id (here: the last two)? 2nd,related question: Assume I want to exclude only <p> with id="ccc": How can I achieve this? Peter
  24. string.replace(/s*/,""); Both, your solution and the one from LaxLoafer work fine. Thx
×
×
  • Create New...