Jump to content

Jonas

Members
  • Posts

    2,402
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by Jonas

  1. The topic has gone under indeed, may there not be an extra sticky topic in the HTML forums?My page is still available, at a new location though, read above post. The old location now shows a redirect message.As the page is now connected to my website, and takes part of the template, you can now navigate to my website from it and back again.Please update your favorites if desired! This is one-time only, with php I can support any future redirects at the server myself.
    Uhm, I liked it better the way it was before. After you added the navigation to your site and changed the colour scheme, it breaks hideously in Opera. :)
  2. I agree, and at £50, RNA isn't a bad program. It is designed for art work, but it is easy to make vertually anything! Also, it comes with a good supplie of export options.
    Please, no advertising. Especially not in a thread where it's off-topic in addition.
  3. Does opera say were this custom js gets inserted? It makes big difference when the js is executed. Ideally it should be added at then end of the page to give you the ability override everything on the page.If the window.onload doesn't work that means that the page is already using the onload event.If the custom JS gets added at the end you can use
    window.onload += hideAd;

    to insert the function and not break existing onload events.

    Hmm, I tried applying the javascript to a spesific site (through "Manage site preferences..."). After I applied it to general user javascript it worked, however now it removes the first table on every page I visit, which means that I need a way for the script to filter sites. I'm thinking along the lines of
    function hideAd(){	var tables = document.getElementsByTagName("table");	if (window.location.search(/starwars.com/) >= 1) {	tables[0].style.display=none;	}}window.onload = hideAd;

    or

    function hideAd(){	var tables = document.getElementsByTagName("table");	if (location.href.search(/starwars.com/) >= 1) {	tables[0].style.display=none;	}}window.onload = hideAd;

    Although that doesn't work. Isn't that the correct way to search for a string within another string?

  4. The getElementsByTagName returns an array of elements; you wouldn't have to declare tables as an Array first.You might try this to see if it's doing anything:
    var tables = document.getElementsByTagName("table");// should alert the number of table elements on the page.alert(tables.length);

    If the tables[0].style.display = "none" part isn't working, could it be that the script is running before all the elements on the page have been loaded into the DOM? If so, you might try this instead:

    function hideAd(){	var tables = document.getElementsByTagName("table");	tables[0].style.display = "none";}window.onload = hideAd;

    that window.onload thing didn't work either. I'm beginning to doubt if Opera's ability to add your own js really works. Anyway, I'll move this to the Javascript forum, since there doesn't seem to be a CSS solution.
  5. So can anyone create a topic in the forum of choice and report it for use? (I will do it in PHP I guess)
    Justsomeguy has already volunteered and gotten responsibility for a PHP Tips topic. If you want to collaborate of course, I'm sure you can PM him. :)
  6. I agree with choco here, no help.
    It's not supposed to be a help site. In fact, to make a design like that on your own it requires intimate knowledge of CSS 1.0 and 2.1, quirks and all. The point of the site is to show people just how powerful CSS really is. You could never have done that simply with html. Ok, maybe you could, but the code would be bloated as ######...
  7. I don't have control over any content on the actual site, only what I can manipulate through Opera (javascript/css overriding, custom js file/stylesheet). That last script you gave me I suppose should work, but doesn't. I'm not an expert or anything, but do you perhaps have to make tables an array or something first?var tables = new Array()or something like that?

  8. Jonas, You can avoid ads by modding your Hosts file, too. The basic procedure is to add the domain to your Hosts file and point the URL to 127.0.0.1. The ads aren't found on your localhost and never get displayed. :)
    Sorry, what? Does this require server access? Because I don't have that.
  9. As far as I understood it, all tags require closing tags...but some don't necessarily have a closing tags...e.g.a link has <a ...> link text </a>script has <script> script here </script>and then there are things that don't have closing tags, like <br>, <link>, <img>... but in order to close them you include the />i.e. <br /> instead of <br>It seems to be to be a more formal way of coding HTML and making sure that all tags are closed, even when they don't have a closing tag...
    It's one of the differences between HTML and XHTML (eXtensible HyperText Markup Language). XHTML is a reformulation of HTML into XML. XML requires "well-formed" documents, that means all tags should be closed, elements should be properly nested (<b><i>text</i></b> as opposed to <b><i>text</b></i>). One of the advantages of this is that you're able to extract elements from the documents and use them in other XML languages. Read more here:http://www.w3schools.com/xhtml/default.aspMain differences between HTML and XHTMLhttp://www.w3schools.com/xhtml/xhtml_html.aspIt's not really difficult going from HTML to XHTML, especially if you picked up good coding habits when learning HTML.
  10. Tried this:

    var ad = document.getElementsByTagName("table");if (ad.border="0" && ad.cellpadding="0" && ad.cellspacing="0" && ad.width="100%" && ad.height="108") {	ad.style.display="none";};

    Didn't work.Perhaps make an array of all the table elements in the source and then hide the first one? Although I wouldn't know how to do that...

  11. post an example of the code and we'll see what we can do.Does opera let you add custom Javascript or only CSS?
    You can customize it however you want. Tools -> Preferences -> Advanced -> Content -> Manage Site Preferences -> Add... -> site adress -> Display (for custom CSS file)/Scripting (for custom JS file).Example of code:
    	<table border="0" cellpadding="0" cellspacing="0" width="100%" height="108">	<tr>		<td align="center" valign="middle" width="100%" height="108" bgcolor="#000000"> 		<table border="0" cellpadding="0" cellspacing="0" width="974" height="108" align="center">			<td align="left" valign="middle" height="108" width="728">			<script LANGUAGE="JavaScript">			headAd = true;			document.write('<script LANGUAGE="JavaScript1.1" SRC="http://ad.doubleclick.net/adj/swlucas.forums/;dcopt=ist;pos=top;tile=1;sz=728x90;ord=' + ord + '?" ><\/SCRIPT>');			</script>			<NOSCRIPT>			<A HREF="http://ad.doubleclick.net/jump/swlucas.forums/;pos=top;tile=1;sz=728x90;ord=123456789?" TARGET="_blank">			<IMG SRC="http://ad.doubleclick.net/ad/swlucas.forums/;pos=top;tile=1;sz=728x90;ord=123456789?" WIDTH="728" HEIGHT="90" BORDER="0" ALT=""></A>			</NOSCRIPT>			</td>			<td><img src="/images/clear.gif" width="172" height="1" /></td>		</table>		</td>	</tr>	<tr>		<td><img src="/images/clear.gif" width="1" height="18" /></td>	</tr>	</table>

    Now, the table element I want to get rid of (the one above) is the first table element in the body element, however it is NOT the first element, so I believe the table:first-child pseudo-class is out the window, unless someone knows something I don't.Anyone get any ideas from this site:http://www.w3.org/TR/CSS21/selector.html?If not, looking into javascript would probably not be a bad idea either. Is it possible to check for all those things (border="0" cellpadding="0" cellspacing="0" width="100%" height="108") and then hide the table element based on that?

  12. I may have misunderstood but can't you use inline style.<table style="display:none" border="0" cellpadding="0" cellspacing="0" width="100%" height="108">
    I don't have control of the page. It's a forum I often visit that have ads. Before it was possible to pay for full membership and get rid of ads. Now they took that out of the membership privileges, so I need another way to get rid of them.
  13. EDIT: MOVED to Javascript forum after being steered towards javascript eventually.Anyone know if it's possible to use more than one attribute selector in CSS?Like, say, there's this website that displays ads, and I want to get rid of the ads through adding a custom stylesheet for that site in Opera. Now, this element doesn't have a unique ID or Class (actually none at all), and selecting based on just one attribute will change other things on the site too, things that I can't miss (this is a forum I'm talking about). Some other elements share some but not all attributes of the one I want to hide. Here's the element I want to get rid of by using display: none;<table border="0" cellpadding="0" cellspacing="0" width="100%" height="108">So, is that possible to get rid of?

  14. In light of topics being made such as this one and consequently this and this, I'm going to give this thread a bump, and urge someone to invest some time and effort if they want to make "Hot Tips" topic. If you want, you can organize this more than one poster, but it must be done according to the list Skemcin posted, well organized (as opposed to half-assed) and encompassing a few topics to start off with (although we can add to it later). Good templates to follow for this are the "Top Tips" topics already created in the XSLT forum and Javascript forum, by Boen_Robot and Skemcin respectively (click names to see topics).Want to take on this task for one of the forums? "REPORT" this topic and include in your message why you feel you would be a good owner for this controlled topic. Thank you.

×
×
  • Create New...