fe-popup.js 720 B

123456789101112131415161718192021222324252627
  1. /**
  2. * FeHelper弹出(下拉)页面
  3. * @author zhaoxianlie
  4. */
  5. $(function () {
  6. // 获取后台页面,返回window对象
  7. var bgPage = chrome.extension.getBackgroundPage();
  8. // 菜单点击以后执行的动作
  9. jQuery('ul.fe-function-list li').click(function (e) {
  10. var msgType = $(this).attr('data-msgtype');
  11. var isUseFile = $(this).attr('data-usefile');
  12. if (msgType == 'COLOR_PICKER') {
  13. bgPage.BgPageInstance.showColorPicker();
  14. } else {
  15. bgPage.BgPageInstance.runHelper({
  16. msgType: MSG_TYPE[msgType],
  17. useFile: isUseFile
  18. });
  19. }
  20. window.close();
  21. });
  22. });