Get information from "inspector" on a web page - web

A really noob web programmer here!
So I need to build a program that, as I give it a link it inspect the page (like the right click and "inspect element" option that we have in Firefox) and get the infromation from it exported. I wanna be able to filter what kind of information that I am having and to put them all together in a hash or somethink like this.
Does anyone have a tip? What language should I go for? There is any plugin or lib that already does that? I just want a direction so I can get started with this project! Thanks!

Related

Prestashop add side menu on specific pages

I have a problem with Prestashop. I have a second menu that I want to display on some pages.
For example, when I click on "program", I get to the "program" page but the side menu does not appear.
I know that it is possible to do this in the block configuration options.
I've tried a lot of things but nothing works, if someone has any advice / lead to give me.
I use a translator, hoping that it will be comprehensible, I remain at your disposal for any further information.
Thank you all, have a good day.

How to Hide The Source

Okay, I am not sure if this question belongs here.
Either way, I am interested to know how to show one source on Developer ➛ Page Source (Firefox) and totally another when CTRL+A on the page ➛ Inspect Element. I have seen it is done on some of the sites I have visited, for instance: http://www.therigsofficial.com/
Thank you. I truly appreciate all help.
It is impossible to hide your javascript completley, but you can make it harder to read by obfuscating.
Try this tool JavaScript Obfuscator. Pro. It can work on your case.

Open webpage in full screen in running sketch at Processing

I wonder how I open webpage in full screen mode in running sketch at Processing.
I am making a simple question/answer game but before solving question. I want users to register or login website first. And then when pressed a certain button on webpage it brings back to start to question.
I appreciate any suggestions.
The answer to this is going to depend on exactly what you're trying to do.
Are you trying to do this from Java mode? If so, google something like "java launch webpage".
Are you trying to do this from JavaScript mode, or with Processing.js or p5.js? If so, google something like "JavaScript fullscreen" and you'll find examples like this and this.
That will allow you to open a webapge in fullscreen mode. Then going back to your Processing sketch again depends on whether you're using Java or JavaScript.
If you're using Java, this is going to be pretty difficult, as you aren't going to be able to get events from the webpage to your Java code. You could try using an applet, but I wouldn't really recommend that since applets are pretty much dead anyway.
If you're using JavaScript, then it's a little easier. You can simply detect the button click in the webpage (by adding an onclick callback) and then call whatever functions you want to close the webpage and reactivate your Processing sketch.
It's hard to answer general "how do I do this" type questions. Stack Overflow is more designed for specific "I tried X, expected Y, but got Z instead" type questions. I really recommend that you just try something out and post an MCVE showing exactly where you're stuck. Good luck.

How to make Google Chrome extension sample work?

Recently I decided to write a very simple Google Chrome extension. All it's going to do is to hide some DOM-elements from the web-page using JavaScript when user presses the extension's button.
Since I knew nothing about Chrome extensions, I started reading tutorials, and I came across this Google's sample: A browser action with no icon that makes the page red
This sample is really close to what I want to make. The problem is that I can't make it work. Whenever I load the extension in Chrome, I can see the button of this extension, but when I press it - nothing happens. Sample doesn't work, probably I should know something I don't know yet.
And before you started asking me:
Yes, I tried restarting the browser;
I use the newest version of Chrome.
Thanks for help.
If you open up the sample zip... find backgrond.js... edit.
Find the line that says:
null, {code:"document.body.style.background='red !important'"});
and remove the "!important". so it should read:
null, {code:"document.body.style.background='red'"});
That is it. just save and reload the extension, should work (unless the page has an !important flag set to the background).
I am afraid I don't know why the "!important" tag doesn't work but I have never been able to get it to work in an extension. Hopefully someone else here will be able to give an explanation and maybe a work around.
I think I can help bring some clarification to the "!important" override attribute causing the extension to break. Though I am not 100% I believe that this attribute is not allowed for issues involving security complications. I have a link to another SO thread that may help clarify this as well.
My CSS is not getting injected through my content script
I'm assuming from reading this article that you must either use the !important override when content scripts specified in the manifest file. Otherwise if the css is being injected !important is not required. Again not 100% on this.

Custom navigation with Liknlist web part

I'm using a standard link list web part. What I want to achieve is before my users click on the link a pop-up javascript warning box will display, stating that they are leaving the domain. In regular anchor tag I would preceed the URL with javascript:ShowWarning('http://www.youtube.com');.
I've search the AllLinks table in the database but did not find the links was looking for.
Where or how are these stored?
Thanks,
Risho
Firstly, editing the SharePoint database directly is a really bad idea. You shouldn't do it unless you really, really know what you are doing, and even then you will probably break the system.
Secondly, any change made in the data will be what shows up in the editor, and I don't think the editor supports links that don't start with "http://".
A better approach is to use jquery to add the popup behaviour to the links when the page is loaded.

Resources