|
|
Subject:
Write me a greasmonkey script/adds contents of another page to view
Category: Computers > Programming Asked by: grrarrgh-ga List Price: $35.00 |
Posted:
08 May 2006 11:37 PDT
Expires: 09 May 2006 09:15 PDT Question ID: 726614 |
I've already got the @include and @exclude statements down. I need: For a page of form: https://www.YYY.com/public/lend/listing.aspx?listingID=15344 (where YYY is some static domain name that I will decide on later) I want to display the http://ZZZ.wikispaces.com/15344 underneath the contents of the first page. (where ZZZ is some static domain name that I will decide on later, testbed.wikispaces.com is the standin for now.) or more generally this script should for every page of the form, https://www.YYY.com/public/lend/listing.aspx?listingID=XYZ add the contents of http://ZZZ.wikispaces.com/XYZ underneath the contents of the first page (in a frame if possible). and XYZ is some number (not necessarily 3 digit) One way to implement this would be to add the text contents (or the page itself, whichever is easier) of the 2nd page in a frame at the bottom of the first. Again, I will fill in the ZZZ and YYY domains on my own later, and those will stay fixed. The only dynamic element is the # at the end of the url. As simple as this is, I'd also want you to relinquish claims to copyright on this scriptlet. | |
|
|
There is no answer at this time. |
|
Subject:
Re: Write me a greasmonkey script/adds contents of another page to view
From: zarembisty-ga on 09 May 2006 09:13 PDT |
this should do the trick; it doesn't add a frame, but an iframe below whatever element you want // ==UserScript== // @name Frame Adder // @namespace // @description // @include YOUR SITE GOES HERE // ==/UserScript== (function() { var addFrame = { go: function() { var listingID = window.location.href.split("=")[1]; //change this to whatever element you want the frame to be added to (usually a DIV or SPAN) var thisNode = document.getElementById("ELEMENTS_ID"); var ifrID = "wiki"; var targetNode = thisNode; var br = document.createElement("br"); var ifr = document.createElement("iframe"); ifr.id = ifrID; ifr.src = "http://ZZZ.wikispaces.com/" + listingID; ifr.style.marginTop = "5px"; ifr.style.width = "100%"; ifr.style.height = "500px"; ifr.style.display = "block"; ifr.style.visibility="visible" targetNode.appendChild(br); targetNode.appendChild(ifr); } } addFrame.go(); })(); |
If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you. |
Search Google Answers for |
Google Home - Answers FAQ - Terms of Service - Privacy Policy |