English 中文(简体)
如何在jQuery颜色框中加载options.html,点击上下文菜单项?
原标题:How to load options.html in jQuery-colorbox, upon a context menu item click?

我正在为我的chrome扩展添加选项。我想知道如何使用颜色框)。

我花了一天多的时间在这件事上,但没有成功。有人做过这件事吗?感谢您的帮助。

问题回答

虽然你肯定不能在背景页上使用它,但由于颜色框显示UI,你可以从内容脚本中选择几个选项:

  1. 您可以执行XHR来获取背景页的内容(chrome.extension.getURL可能会有所帮助),并将结果的内容写入颜色框中。

  2. 您可以嵌入<;iframe src=“/path/to/options.html”>

我假设你知道如何将JS函数绑定到上下文菜单?以防万一,contextMenu文档

你试过这两种选择吗?





相关问题
Redirect to cache URL in Chrome browser

self.location = cache: + self.location I want to redirect from "[URL]" to "cache:[URL]". I just want this code to work in Chrome browser.

我如何更新/重载 Chrome延?

I m在4号 Chrome(目前为4.0.249.0)中开发一个延伸点,显示用户在地位酒吧中的形象。 Ive设计了一个供用户使用的备选办法网页......

Setting Opacity in CSS For Chrome

I ve tried the following: (this is actually for fancybox, as the overlay does not show in chrome/safari: $("#fancy_overlay").css({<br /> background-color : opts....

Chrome Blocking Javascript, Google Wave, Google Gadgets

Project: Developing a gadget template for Google Wave which will allow my Flash movies to interact with the Wave api. I had to adapt the existing Flex application so that it would work with ...

image height using jquery in chrome problem

$( img ).height() returns 0 in chrome, but it returns the actual height in IE and firefox. Whats the actual method to get the height of the image in chrome?

jQuery block moving

I wanna move a div block to the top, so I coded like this: CSS part: .movingPart{ margin-top:80px; } jQuery part: $(document).ready(function() { $( #btn ).click(function() { $( .movingPart )....

Table cells bad rendering with Google Chrome/Webkit

On the following code, COL1A and COL3A are not 50% height with Chrome or Webkit. It works fine with IE7 and Firefox. <table border="1"> <tr> <td height="100%">COL 1A</td>...