How can I change the 'internal' URL prefix (Chromium Source)? - browser

I'm currently working on a Chromium fork and I'm wondering if there's a good way to change the "Internal URL Prefix" (e.g. chrome://). Does anyone know where you can change it (or rather, if there's a file similar to the chromium_strings.grd where you can change stuff like that.
Pretty new to StackOverflow so excuse any newbie mistakes please!

Related

How do I check if certain text exists on a page (puppeteer)

Sorry in advance if I seem kinda clueless, I just started using puppeteer yesterday and I’m inexperienced with this kinda stuff.
I’m trying to check if a certain page (opened with puppeteer) has the phrase “hello” for example, keep in mind that I know the XPath of the text (if it exists). I’ve tried .waitForXPath() but I can’t seem to get it to work. Is there an easier function for this?
(await page.content()).match('hello')
That depends on what you typed into .waitforXPath() method.
I can imagine this can work:
await page.waitForXPath("//*[contains(text(), 'hello')]");
But it might be slow because all texts of all elements will be searched. It's better to narrow down the search to e.g. some elements. Unfortunately you don't provide more specifics, so I can't help you there.

How to rewrite URL ".com?foo=bar" TO ".com/bar " and still get the value of $foo

I have this site, Basilica, which is based on a WP template.
http://www.bazylikaswidnicka.com/wirtualnie/?pan=pan_szopka
I added some PHP stuff to it and the site apparently gets hurt by that ( seo wise ), especially by the section of virtual tours.There I used the ol' good fashioned PHP, structural in form, to catch what a viewer wants to see.
I would like to be able to change the following address:
http://www.bazylikaswidnicka.com/wirtualnie/?pan=pan_szopka
to:
http://www.bazylikaswidnicka.com/wirtualnie/pan_szopka
yet still be able to catch the value of $pan. How do I do that?
The .htaccess is already in place by default, it changes all the other links, how do I add this trickery to an extra value in the url to make wonders for this small portion of the website, too?
I don't expect you to write a script for me, but if you can give me a little nudge to where I should turn to that would be enough.
As far as I know you can't do this. You would need to provide anything you wish to allow the page to have access to to be in the URL.
If you are talking about simply retrieving the value from the url then you can do something like
$URLPartList = explode('/', $_SERVER['REQUEST_URI']);
$pan = $URLPartList[1];

ModX friendly url has a bad format

Sorry, this is probably a very basic question, but I'm new to ModX and haven't been able to find an answer.
I am trying to get friendly urls working, but right now, all my urls are showing up like
http://localhost/modx/modx-2.2.13-pl/"http://localhost/modx/modx-2.2.13-pl/other.html
instead of the expected
http://localhost/modx/modx-2.2.13-pl/other.html
I probably don't have some system setting set correctly; any help would be greatly appreciated...
Sounds like you've forgotten to add
<base href="[[++site_url]]" />
To your head.
At least that is the first thing that comes to mind.
Sounds like you're generating the links with full path, are you doing them yourselves or is it Wayfinder or some snippet? And why do you have a " there in the middle of the string?
The basic idea is to use a base_href consisting of your root, http://localhost/modx/modx-2.2.13-pl/, and then construct links like [[~[[+idToPageYouWantToLink]]]].

tailing file into web page using nodejs and io.socket

I'm trying to tail a file into webpage.
I want to do it as efficient that it can be.
I looked into our old friend google , but couldn't decide what to take , and more important - how.
let's say I have a txt file , and every time something is written inside it , I want the new data to be printed on the web page.
I'm Noob on all this web area, so please be kind :)
I tried to look into nodejs and io.socket and couldn't make it work.
if you think of other good and effective solution - please share it with me.
I'll be happy to get some help here.
Please be easy on me ..
Thanks !

htaccess working, but layout broken?

I don't know a huge amount about htacess and modrewrite, so I find myself in yet another predicament approaching this new zone for myself.
I will seperate my Inquiries over 2 different questions to allow answers to be on-topic and better targetted to users searching for solutions to their own questions.
This is the second of those 2 inquiries;
I have the following in my htaccess file;
RewriteRule ^install/([a-zA-Z0-9]+)/$ index.php?module=faq&page=howto&program=$1
The concept is that install/abcd/ would call index.php?module=faq&page=howto&program=abcd
That works. It pulls the content, matches it and shows what it is meant to. I have used server variables to show me what is being simulated and it matches up.
However the CSS and images on the page are being stripped as they are relative to the document, not statically assigned.
I am only using htaccess (For Now I guess?) for one solution, with the intention to soon impliment another fairly soon. The intention is to offer our customers easy to read URL's for support purposes, but not rewriting the entire site. SEO isnt a major issue as our site is only to be used by those it is intended for as opposed to a wide audience.
Other than statically assigning css, JS and image files, is there a way to fix this issue so that the page is displayed styled and with the javascript in tact?
Thanks for your help, I hope the question was understandable and as always I appreciate the time you guys take to help us all!
We need to either make the css links absolute (starts with a /) or add a base for all our relative links by adding an extra attribute to the header:
<base href="/">
This would mean that you we start with the subdirectory of /test/. so instead of the css being;
http://domain.com/install/abcd/style.css
It would instead
http://domain.com/style.css
This is the problem I was having due to all my CSS and JS being included relativly (Allowing me to change the directory my script is in).
The above adjustment has in fact fixed my original problem, however without the use of PHP may open up an issue for some who want to be able to deploy the scripts and allow them to be fully dynamic without having to edit the base. Good luck!

Resources