How to permanently save Web page modifications - html

So I've made some little modifications to a particular website (background color, fonts, etc...) and I want these changes to be permanently applied for the next visits.
The issue is when I refresh the website, it goes back to its initial form.
Wether it's for Google or Safari web browser, is there a way to accomplish such task?

The thing is that each time you enter a website your browser downloads the whole DOM code of this site. The changes you make with Chrome's or Safari's dev tools applies only for the already-downloaded DOM that is displayed on your browser, but next time you will enter the same website, a new DOM will be downloaded and displayed - without your changes.
So, actually, I'm sorry but what you want is not possible.
What you can do is:
Save the modified HTML code to your PC (I don't know if it helps you).
Use an extension that allows you to run a JS code automatically on page load (there are bunch of this kind of extensions), and with that JS code you can manipulate the DOM the way you wish to. Yea I know, that solution involves maybe long code writing but this is the way you can change the new DOM every time - automatically.

Related

Writing a Google Chrome extension for an aspx page

I'd like to know if someone can point me in the correct direction for this. I've been interested in writing a chrome extension to improve my workflow since we use a lot of webapps at my job. For example, my jobs ticketing system is pretty old and requires that we look manually for any changes or updates. It's got email notifications built in, but they are slow and unreliable.
I've never written chrome extensions before so I looked at some tutorials but none of them give me any information about doing this on an aspx page. Since I don't have direct access to the server this runs from, I thought it should be possible to do something from my end such as automatically refreshing the page using the page's refresh button instead of the browsers refresh button, or automatically opening some collapsed menus which default to being collapsed when you refresh the page.
I was hoping someone could help me figure out how to go about doing this because so far my research hasn't given me anything I can directly apply to this issue.

Inspect element Chrome CSS changes lost on refresh

This might be a weird question but i do this often enough that I'm going to ask, When i am making some adjustments to the look of my web page via CSS I often just inspect element and put in the changes and then when it looks right i copy and paste those changes back to my css sheet and save (the css files are located on my remote server uploaded with FTP), occasionally i accidently refresh the page without the css properly copied and loose my css, is there a way to "get back those changes after refreshing my page or is there a tool i could use to automatically save/back them up so they don't get lost?
You can do this with DevTools Workspaces: https://developer.chrome.com/docs/devtools/workspaces/
You can only make changes to CSS in a file, not inline CSS or HTML markup.
I hack styles into pages and copy them over in the same way that you do.
To answer your question, I don't know of any way to get the changes back (clearing changes is the whole point of 'refreshing'), but here are 2 alternative options:
Make smaller changes (I try to focus on a single element/node at a time)
There are a lot of chrome extensions that tackle this type of problem
https://chrome.google.com/webstore/detail/devtools-autosave/mlejngncgiocofkcbnnpaieapabmanfl?hl=en

Is there any way to permanently alter how a webpage displays on the client-side (without server access)?

Firebug lets you edit individual web pages locally, with live updating so you can see the effects of your changes right away. Unfortunately, these changes are lost after the page is refreshed.
Is there any way to make these changes "sticky" in some way, such that repeated visits to the site would reload your own customized html/css that you edited? I'm thinking perhaps some sort of Firebug feature that I'm missing, or another plugin of some sort...
Just to be clear, I'm not talking about websites I have server side access to. I would simply like to be able to reposition the content of some pages I visit frequently so it fits better on my monitor setup, which I can do in Firebug but I have to do it every time the page loads (I would like to be able to avoid having to do that).
You should make use of the Greasemonkey and / or Stylish addons for Firefox.
These where originally developed to do exactly what you intend to achieve.
Also check out this article on how to get started with Stylish.

fetch html code, edit it and load it with web view

am new to the iphone development and I have a problem to display a certain site that is essential for my app.
What I want to do is to display this site with no horizontal scrolling and with a text size that can be read without zooming in or out.
As far as I understand this is impossible without mess with the html source code.
But I have no idea how to fetch it, and most importantly how to modify it and with which tools I can do that.
And then how I can load that code in my web view.
I know that I ask to much but I want to learn how to do this stuff and I don't search for someone to give me a ready solution but to point me in the right direction.
If I understand your question correctly, you want to render a site which is not under your control and add certain style changes (font size, no-scroll, etc) to it.
If what you need from the page doesn't change (i.e. it's a static page), then this should be fairly easy. You simply copy the code from the source by saving the page as an HTML file from your web browser. From there, you can use your favorite HTML/CSS editor to make the changes that you need and then host it yourself.
If you don't want to host the code yourself and/or the page is dynamic then you're going to need to give us more information to adequately answer this question.

How to hide precious HTML from user eyes?

I am thinking to create an website that generates HTML through a wizard.Finally, I want to make the users to buy the generated HTML source if they like what they see.
But I don't want to let the users to steal the HTML, CSS and JS that I use to create the effect they want.
I want a technique which is immune to Firebug and Right Click -> View Page Source.
Any thoughts ?
edit: I remember something about iframes or frameset, but I'm not sure how to fool the browser and Firebug to execute the code without updating their capability of showing that source code. A popup is also a possible solution.
edit 2: html hosted in silverlight ? will you use it ?
The best thing you can do is to just obfuscate your code. Trying to hide the source is not going to work (for ex: if you disable right click-> view source that doesn't stop them from using the menu or saving the page or using a shortcut key or writing an app to stream the http request into a file and open that, etc).
Firstly, depending on what you are doing you can have the HTML code loaded through JS after the page load (AJAX).
As far as your JS goes:
Free Obfuscator
Not Free Obfuscator
In the end though, there is no stopping someone who really wants to get that source. Even obfuscated code can be rebuilt (though it's hell on wheels painful depending on how good the obfuscator is).
To really protect the sample HTML from prying eyes, you'd need to render it on the server-side and only pass image data to the client. If you want the user to be able to interact with the sample as if it were a normal Web page, you'll also need to send their pointer and keyboard inputs to the server and update the displayed image when necessary. At that point, though, you're basically making an HTTP-based version of VNC. This is definitely possible, but I don't think it will be easy, and I doubt there are any existing software packages to let you do this. If I were you, I'd rethink my business model a bit.
Sending XSL-templated XML to the browser may be enough fool some, and it will work more or less the same in many modern browsers including IE6 (maybe even 5.5).
But really, trying to hide the HTML code isn't going to work if anyone halfway serious wants to get it.
I am thinking to create an website that generates HTML through a wizard.
Finally, I want to make the users to buy the generated HTML source if they like what they see.
If this is what you need you might consider the possibility of creating a preview of the page as an image, and provide the download of the source only after the user agreed and paid. There is no magic way to let a browser display a code that you can't see.
You can make a video, showing the functionality and upload the same, which may help users to view / feel it.