Mirman: How to add one more string after Basel
Pexsa: Kame, You could try using /Baselotherstring/g
Pexsa: Kame, regular expressions use a single for OR.
Pexsa: Kame, You could also just run a second replace.
Hahnert: Pexsa Both ideas doesn’t work.
Danielle: One line work. If I repeat this, nothing work at all
Pexsa: Does the single replace work?
Caviggia: If it’s regex with or, shouldn’t there be brackets?
Pexsa: RedAero, Brackets are for char cl***es.
Pexsa: RedAero, You can use parentheses for making an OR more specific, but they are also capture groups.
Brashear: Ugh, this is going to drive me nuts now. XD
Wakley: Nasalroad: string ‘bla$1/bla bla$1/bla bla$1/bla’
Wakley: Nasalroad: string ‘blaBasel/bla blabar/bla blaBasel/bla’
Wakley: Nasalroad: string ‘blaBasel/bla blabar/bla blaBasel/bla’
Stoneking: I don’t know whats going on here. But now my one-word-version stopped working
Lazzara: I’ve got issue with bPopup – it works fine once, but when I try to pop the same window for the second time, it is displayed in ugly way
Consolini: Anybody have encountered a similar problem? anybody can help me?
Uptain: But what is the solution now?
Bagozzi: SyntaxError: unlabeled break must be inside loop or switch
Siriani: You can’t break in a foo.forEachfunctionx {} .
Pexsa: Kame, The last snippet that Nasalroad ran through Wakley does exactly what you asked.
Pexsa: Just put the html that you want in place of bla
Ramphal: Do***ent.body.innerHTML = do***ent.body.innerHTML.replace/BaselBern/g, function m { return ‘span style=”background-color:lightgreen”‘ + m + ‘/span’ };
Pexsa: Kame, Are you sure that do***ent.body.innerHTML is what you want?
Dehetre: No, I am not sure. But this works with only on keyword
Pexsa: Can you show us a jsfiddle of it not working?
Wakley: Pexsa: Show some code, but don’t paste it on the channel. For frontend code HTML/CSS/JS, you can provide a test case that we can run, so that we can help you: use https://jsfiddle.net , https://jsbin.com , or http://requirebin.com . For Node.js code, use sites like https://gist.github.com/ and https://bpaste.net .
Remmele: What does a = b do ? a to the power of b or a XOR b ?
Pexsa: Silv3r_m00n, = is an ***ignment operator. So a = b; equivalent to a = a b;
Pexsa: So it XORs a and b, then ***igns the result to a.
Wilmott: Jsfiddle — cool : Here it works
Muegge: Can anybody help me with bPopup?
Appia: Any idea what this function is doing, http://paste.ubuntu.com/12338770/
Stockstill: Then I have a problem with greasemonkey?
Hopperstad: The problem is really the website!
Mcalister: I’ve got issue with bPopup – it works fine once, but when I try to pop the same window for the second time, it is displayed in ugly, wrong way. how can I fix that?
Pexsa: Kame, Well, see if do***ent.body is the way to access the body in Greasemonkey. It’s been a long time since I’ve used it, so I don’t recall.
Pexsa: Kame, Also, you might check that the script is actually running against the page, and not a different page or something like that.
Maddy: Is this code finding the remainder, var i = Math.floorx / y; return x – i * y; ?
Fosnough: Isnt there something like a %b ?
Pexsa: Silv3r_m00n, That code isn’t finding the remainder.
Pexsa: Silv3r_m00n, a % b is the remainder of a / b.
Bukowiecki: Pexsa: then what is that code finding ?
Pexsa: Silv3r_m00n, I’m not sure exactly, but if you take an example, you can work it out.
Renollet: Pexsa: are you sure var i = Math.floorx / y; return x – i * y; ? is not finding the remainder ?