我可以在移动Safari上使用用户css重载CSS? [英] Can I over-ride CSS with user-css on Mobile Safari?

查看:124
本文介绍了我可以在移动Safari上使用用户css重载CSS?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试修改网站的CSS http://www.baomoi.com 祖母。我想修改CSS为她更容易阅读,并使它更简约。我尝试使用JavaScript书签:

  javascript:(function(){if%20(!document.getElementById('someuniqueid ')){var%20objHead%20 =%20document.getElementsByTagName('head');%20if%20(objHead [0]){if%20(document.createElementNS%20&&%20objHead [0] .tagName %20 ==%20'head')%20var%20objCSS%20 =%20objHead [0] .appendChild(document.createElementNS('http://www.w3.org/1999/xhtml',%20'link' );%20else%20var%20objCSS%20 =%20objHead [0] .appendChild(document.createElement('link'));%20objCSS.id%20 =%20'someuniqueid'%20objCSS.rel%20 = %20'stylesheet';%20objCSS.href%20 =%20'http://fu.com/minimal.css';%20objCSS.type%20 =%20'text / css';}}}) 

这种方法在最初加载时会运行一次,



是否可以将网站包含在iframe中,并使CSS在整个网站中保持持久?



还是更容易创建一个加载网站并永久插入CSS的本地iPad应用程序?



我发现这个想法;但只是下载Xcode SDK,不想深入创建一个iPad应用程序只是为了这个,如果有一个更容易的方法。



基本上,我只需要更改CSS baomoi.com ,并在链接被点击后始终保持不变。



非常感谢任何想法和建议。



谢谢!



:我现在看看(CSSPivot)现在,再次感谢您的建议,我是新的移动safari,我已经注意到iframe没有因为某些原因滚动条。



还有任何关于走一条真正的IPad应用程序的路线的建议,也能够做到这一点?我正在考虑看自由职业者或类似的网站,在那里我可以找到一个人为我创造这个,因为我没有开发IOS的经验。



IPad是一个容易的设备对于我的祖母使用,我想让它在那里她可以访问一些网站(越南网站,但他们是相当复杂的导航她,颜色方案很难看到)。



再次感谢您的建议。

解决方案

GreaseMonkey插件 for Firefox(或 Chrome的TamperMonkey插件)可能是您想要完成的理想选择,您可以指定特定的网站和哪个脚本应该运行网站。



Userscripts.org:Power-



使用csspivot.com(编辑:死的网址)



您可以重写网站的CSS并使用网址重新访问保存在csspivot上。


I am trying to modify the CSS of the website http://www.baomoi.com for my grandmother. I'd like to modify the CSS for easier readability for her and to make it more minimalistic. I have tried using a JavaScript bookmarklet:

javascript:(function(){if%20(!document.getElementById('someuniqueid')){var%20objHead%20=%20document.getElementsByTagName('head');%20if%20(objHead[0]){if%20(document.createElementNS%20&&%20objHead[0].tagName%20==%20'head')%20var%20objCSS%20=%20objHead[0].appendChild(document.createElementNS('http://www.w3.org/1999/xhtml',%20'link'));%20else%20var%20objCSS%20=%20objHead[0].appendChild(document.createElement('link'));%20objCSS.id%20=%20'someuniqueid';%20objCSS.rel%20=%20'stylesheet';%20objCSS.href%20=%20'http://fu.com/minimal.css';%20objCSS.type%20=%20'text/css';}}})()

This works once when it is initially loaded, but when another link is clicked on the site it loads back the default site's CSS.

Would it be possible to have the site contained in an iframe and have the CSS stay persistent all throughout the site?

Or would it be easier to create a native iPad app that loads the site and inserts the CSS persistently?

I found this idea; but just downloaded the Xcode SDK and do not want to delve into creating an iPad app just for this if there is an easier method.

Essentially, I just need to change the CSS of the site baomoi.com and have it stay persistent throughout as the links are clicked.

Any ideas and suggestions would be greatly appreciated.

Thank you!

Edit: I am taking a look at that (CSSPivot) now, again thank you for your suggestions, I am new to mobile safari and I have already noticed that iframes dont have scrollbars for some reason.

Also any suggestions on going the route of making an actual IPad app that would be able to do this as well? I was considering looking at freelancer or similar site where I could find someone to create this for me as I have no experience in developing for IOS.

The IPad is an easy device for my grandmother to use and I would like to make it where she can access a few sites (Vietnamese sites but they are fairly complicated to navigate for her and the color schemes are hard to see).

Again thank you in advance for your suggestions.

解决方案

the GreaseMonkey plugin for Firefox (or TamperMonkey plugin for Chrome) may be ideal for what you're trying to accomplish you can specify a specific site and which script should run on that site.

There are several community scripts available on Userscripts.org: Power-ups for your browser or like you've done create your own.

EDIT:

use csspivot.com (edit: dead url)

you can rewrite a site's CSS and re-access it with a URL that's saved on csspivot.

这篇关于我可以在移动Safari上使用用户css重载CSS?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆