zoukankan      html  css  js  c++  java
  • 如何在iPhone与iPad上开启firebug

    原文:

    MARTIN KOOL

    games - web - dad - sarien.net - q42 - livejs - handcraft

    Web developers targetting HTML5 on iDevices would really benefit from having Web Developer Tools or Firebug on Mobile Safari. Enter Firebug Lite! However, iPads, iPhones and bookmarklets don’t go well together, so I put together this little howto.

    All credits to Joe Hewitt for creating Firebug.

    1. Surf to this page on your iPad or iPhone and bookmark it 
    2. Rename the bookmark to “Firebug”. As you can see, the URL is uneditable right now
    3. Tap on this textarea 
    4. Tap it again, choose “Select All” followed by “Copy”
    5. Edit the Firebug bookmarklet, remove the URL and paste the bookmarklet
    6. Choose “Done” (on the virtual keyboard) and you’re all set

    Hitting that bookmarklet should give you a fully functioning Firebug at the bottom of your iPad’s viewport, like this:

    原文中的代码没有显示,为以下代码

    javascript:(function(F,i,r,e,b,u,g,L,I,T,E){if(F.getElementById(b))return;E=F[i+'NS']&&F.documentElement.namespaceURI;E=E?F[i+'NS'](E,'script'):F[i]('script');E[r]('id',b);E[r]('src',I+g+T);E[r](b,u);(F[e]('head')[0]||F[e]('body')[0]).appendChild(E);E=new Image;E[r]('src',I+L);})(document,'createElement','setAttribute','getElementsByTagName','FirebugLite','4','firebug-lite.js','releases/lite/latest/skin/xp/sprite.png','https://getfirebug.com/','#startOpened');

    效果如上所示。

    添加bookmark的地方如下:

  • 相关阅读:
    349、两个数组的交集 | JS集合
    JS集合Set
    JS里的队列和链表
    使用链表指针获取JSON的节点值
    141、环形链表 | JS-链表
    83、删除排序链表中的重复元素 | JS-链表
    2、两数相加 | JS-链表
    事件循环与任务队列
    933、最近的请求次数 | JS-队列
    栈JS实现
  • 原文地址:https://www.cnblogs.com/yaoliang11/p/3288849.html
Copyright © 2011-2022 走看看