Hi pall It makes sense. Will have a go at it. Thanks for all your help! Dave On 26 Feb 2016 16:29, "Pall Thayer" <pallt...@gmail.com> wrote:
> That's going to be tricky. You'll need to go through word by word, > checking for matches to the ones that you want to change. If a match is > found then you want the script to ignore the blank space replacement. If > the word is not a match then you want to go through each character and > replace it with an character. Does that make sense? > > On Fri, Feb 26, 2016 at 7:55 AM dave miller <dave.miller...@gmail.com> > wrote: > >> Thanks Pall >> >> That works well! >> >> My next question (sorry to keep bothering you) is how would I replace all >> the text on a page with blank space, except replace certain words with >> other words? >> >> Last question, honest! >> >> dave >> >> On 25 February 2016 at 17:16, Pall Thayer <pallt...@gmail.com> wrote: >> >>> Hi Dave, >>> >>> You'll need to change the selector for the getElementsByTagName function: >>> >>> var elements = document.getElementsByTagName('img'); >>> >>> Then you can loop through the results and change the 'src' attribute: >>> >>> for(var i=0;i < elements.length;i++) { >>> elements[i].src = 'a_different_image.png'; >>> } >>> >>> You would only need a single for loop for this. Not two nested ones like >>> in the original. >>> >>> Best r. >>> Pall >>> >>> On Thu, Feb 25, 2016 at 10:37 AM dave miller <dave.miller...@gmail.com> >>> wrote: >>> >>>> Hi Pall >>>> Have got it working in Chrome and am customising it. >>>> It's really great! >>>> How would I replace images in the content.js file? >>>> >>>> Sorry to bother you! >>>> >>>> dave >>>> >>>> On 25 February 2016 at 12:09, dave miller <dave.miller...@gmail.com> >>>> wrote: >>>> >>>>> Thanks Pall >>>>> I think this could be a good way to tell stories by deleting and >>>>> replacing content in web pages. >>>>> Thanks for the code and will have a play. >>>>> Dave >>>>> On 25 Feb 2016 12:05, "Pall Thayer" <pallt...@gmail.com> wrote: >>>>> >>>>>> Hi Dave, >>>>>> >>>>>> I hadn't seen Nick's Deletionist but it sounds familiar. Either he >>>>>> has mentioned it to me or I've come across it before. Fun to play with. >>>>>> >>>>>> Chrome extensions are pretty easy to create. They're mostly just >>>>>> javascript. I used regular expressions to search and replace text in the >>>>>> current document. I've attached the source code if you're interested in >>>>>> exploring it. >>>>>> >>>>>> Best r. >>>>>> Pall >>>>>> >>>>>> On Thu, Feb 25, 2016 at 4:25 AM dave miller <dave.miller...@gmail.com> >>>>>> wrote: >>>>>> >>>>>>> Hi Pall and Bjorn >>>>>>> >>>>>>> Have you seen this from Nick Montfort and Amanda Borsuk (2013): >>>>>>> http://thedeletionist.com/about.html >>>>>>> >>>>>>> The Deletionist is a concise system for automatically producing an >>>>>>> erasure poem from any Web page. It systematically removes text to >>>>>>> uncover >>>>>>> poems, discovering a network of poems called “the Worl” within the World >>>>>>> Wide Web. >>>>>>> >>>>>>> Also - bit of a different approach - translating web pages into >>>>>>> slang: >>>>>>> http://www.rinkworks.com/dialect/ >>>>>>> >>>>>>> The idea of filtering the news using a browser is interesting, as >>>>>>> the news we receive is filtered anyway. >>>>>>> >>>>>>> How did you make the Google Chrome extension? >>>>>>> >>>>>>> dave >>>>>>> >>>>>>> >>>>>>> On 11 February 2016 at 12:22, Pall Thayer <pallt...@gmail.com> >>>>>>> wrote: >>>>>>> >>>>>>>> I thought about that... i.e. that it would be interesting if users >>>>>>>> could change settings to find and replace whatever they want with >>>>>>>> whatever >>>>>>>> they want but didn't feel like digging too deep to figure out how to do >>>>>>>> that. Who knows... maybe a plugin like that already exists. >>>>>>>> >>>>>>>> Best r. >>>>>>>> Pall >>>>>>>> >>>>>>>> On Thu, Feb 11, 2016 at 5:34 AM Bjørn Magnhildøen < >>>>>>>> noem...@gmail.com> wrote: >>>>>>>> >>>>>>>>> very cool - browsers should come with this feature default, the >>>>>>>>> ability to add names, words, and expressions to a list to be >>>>>>>>> automatically replaced or deleted, for whenever you're tired of... >>>>>>>>> being branded (the consumer is consumed). imagine people starting >>>>>>>>> to >>>>>>>>> share and build subcultures of find and replace where google would >>>>>>>>> only be known as gargoyle, facebook as [fill in], twit as twat or >>>>>>>>> whatever, undermining business branding, or any concept or >>>>>>>>> expression >>>>>>>>> you're tired of being read into. and it's so simple. >>>>>>>>> >>>>>>>>> On Thu, Feb 11, 2016 at 5:02 AM, Pall Thayer <pallt...@gmail.com> >>>>>>>>> wrote: >>>>>>>>> > I made a Google Chrome extension that replaces Republican >>>>>>>>> candidates names >>>>>>>>> > with their "rapper" nicknames... >>>>>>>>> > >>>>>>>>> > >>>>>>>>> https://chrome.google.com/webstore/detail/repub-rappers/nndedgpdnlmbkapigoilbpdanfpiapka >>>>>>>>> > -- >>>>>>>>> > P Thayer, Artist >>>>>>>>> > http://pallthayer.dyndns.org >>>>>>>>> > >>>>>>>>> > _______________________________________________ >>>>>>>>> > NetBehaviour mailing list >>>>>>>>> > NetBehaviour@netbehaviour.org >>>>>>>>> > http://www.netbehaviour.org/mailman/listinfo/netbehaviour >>>>>>>>> _______________________________________________ >>>>>>>>> NetBehaviour mailing list >>>>>>>>> NetBehaviour@netbehaviour.org >>>>>>>>> http://www.netbehaviour.org/mailman/listinfo/netbehaviour >>>>>>>>> >>>>>>>> -- >>>>>>>> P Thayer, Artist >>>>>>>> http://pallthayer.dyndns.org >>>>>>>> >>>>>>>> _______________________________________________ >>>>>>>> NetBehaviour mailing list >>>>>>>> NetBehaviour@netbehaviour.org >>>>>>>> http://www.netbehaviour.org/mailman/listinfo/netbehaviour >>>>>>>> >>>>>>> >>>>>>> _______________________________________________ >>>>>>> NetBehaviour mailing list >>>>>>> NetBehaviour@netbehaviour.org >>>>>>> http://www.netbehaviour.org/mailman/listinfo/netbehaviour >>>>>> >>>>>> -- >>>>>> P Thayer, Artist >>>>>> http://pallthayer.dyndns.org >>>>>> >>>>>> _______________________________________________ >>>>>> NetBehaviour mailing list >>>>>> NetBehaviour@netbehaviour.org >>>>>> http://www.netbehaviour.org/mailman/listinfo/netbehaviour >>>>>> >>>>> >>>> _______________________________________________ >>>> NetBehaviour mailing list >>>> NetBehaviour@netbehaviour.org >>>> http://www.netbehaviour.org/mailman/listinfo/netbehaviour >>> >>> -- >>> P Thayer, Artist >>> http://pallthayer.dyndns.org >>> >>> _______________________________________________ >>> NetBehaviour mailing list >>> NetBehaviour@netbehaviour.org >>> http://www.netbehaviour.org/mailman/listinfo/netbehaviour >>> >> >> _______________________________________________ >> NetBehaviour mailing list >> NetBehaviour@netbehaviour.org >> http://www.netbehaviour.org/mailman/listinfo/netbehaviour > > -- > P Thayer, Artist > http://pallthayer.dyndns.org > > _______________________________________________ > NetBehaviour mailing list > NetBehaviour@netbehaviour.org > http://www.netbehaviour.org/mailman/listinfo/netbehaviour >
_______________________________________________ NetBehaviour mailing list NetBehaviour@netbehaviour.org http://www.netbehaviour.org/mailman/listinfo/netbehaviour