小编use*_*293的帖子

chrome.webRequest无法正常工作?

我正在尝试在我的扩展程序中实现chrome.webRequest API,但出于某种原因,无论我做什么,它都无法正常工作.有人可以发布一个使用示例吗?还是纠正我的错误?基本上我要做的就是从响应中拦截收到的标题.

这是onBeforeSendHeaders的实现,但我也想使用OnHeadersRecieved:

var requestFilter = {
    urls: [ "<all_urls>" ]
  },
  // The 'extraInfoSpec' parameter modifies how Chrome calls your
  // listener function. 'requestHeaders' ensures that the 'details'
  // object has a key called 'requestHeaders' containing the headers,
  // and 'blocking' ensures that the object your function returns is
  // used to overwrite the headers
  extraInfoSpec = ['requestHeaders','blocking'],
  // Chrome will call your listener function in response to every
  // HTTP request
  handler = function( details ) {
    alert(details); …
Run Code Online (Sandbox Code Playgroud)

javascript google-chrome google-chrome-extension

17
推荐指数
2
解决办法
3万
查看次数

反应 - "减速器可能不会发出动作." 导航到路线后

我正在使用

hashHistory.push('/home')
Run Code Online (Sandbox Code Playgroud)

导航到我的应用程序上的某些路线.但是,每当我使用它时,我都会得到它

Reducers may not dispatch actions.
Run Code Online (Sandbox Code Playgroud)

如何在不收到此错误的情况下正确导航到某条路线?

reactjs react-router

6
推荐指数
1
解决办法
4546
查看次数

React &amp; Redux - 路由更改后状态变空

我正在构建一个 react & redux 应用程序,我遇到的问题是,在我完成browserHistory.push('/myroute')并成功路由之后,我看到我的状态已被清除,而我需要一些关于上一个路由状态的数据。 . 我还没有发现这是否是自然的

我的情况是我需要在路由之间传输数据..我认为这就是状态

这是我的日志:

 action @ 16:21:35.917 ON_ACTIVATE_FINISHED
counter.js:68 Object {counter: Object, registerReducer: Object, routing: Object}
core.js:97  action @ 16:21:35.928 @@router/LOCATION_CHANGE
register.js:9 Object {}
core.js:97  action @ 16:21:38.840 INPUT_PW_CHANGED
Run Code Online (Sandbox Code Playgroud)

routes.js

// @flow
import React from 'react';
import { Route, IndexRoute } from 'react-router';
import App from './containers/App';
import HomePage from './containers/HomePage';
import CounterPage from './containers/CounterPage';
import RegisterPage from './containers/RegisterPage';


export default (
  <Route path="/" component={App}>
    <IndexRoute component={CounterPage} />
    <Route path="/counter" component={CounterPage} /> …
Run Code Online (Sandbox Code Playgroud)

javascript reactjs redux

5
推荐指数
1
解决办法
1349
查看次数

在发布模式下编译时出错

我正在使用VS2008构建IE扩展(ATL),不知何故,当我切换到发布模式时,它会给我一些链接错误:

Error   2   fatal error C1083: Cannot open include file: 'ImplAddon.h': No such file or directory   *************** 19  Engine
Error   3   fatal error LNK1181: cannot open input file '..\release addon\engine.lib'   Addon Addon
Run Code Online (Sandbox Code Playgroud)

我试图在项目属性的"附加包含目录"中添加每个项目"ImplAddon.h"的相关路径,但没有任何帮助.

不知道该怎么办?

非常感谢fellas :)

c++ internet-explorer visual-studio

2
推荐指数
1
解决办法
2220
查看次数

Internet Explorer BHO,写入注册表和管理员权限

由于某些原因,当我尝试写入注册表时IE没有以管理员权限运行,

Utils::SetValueInRegistry(HKEY_CURRENT_USER,L"Software\\myApp23",L"Domain", value.c_str());
Run Code Online (Sandbox Code Playgroud)

任何人都知道如何获得我的BHO权限每次写入注册表?或者也许我应该写一个可用于编写的注册表的另一部分?我需要存储的信息非常动态,用于在标签之间进行通信.

谢谢.

c++ windows winapi internet-explorer bho

1
推荐指数
1
解决办法
415
查看次数

字典词典失去了它的价值

        Dictionary<string, string> f = new Dictionary<string, string>();
        Dictionary<int, Dictionary<string, string>> lines = new Dictionary<int, Dictionary<string, string>>();

        while ((line = sr.ReadLine()) != null)
        {
            lineArr = line.Split(',');
            int x = 0;
            foreach (string field in lineArr)
            {
                f.Add(keys[x], field);
                x++;
            }
            lines.Add(lineIndex, f);
            f.Clear();
            lineIndex++;
Run Code Online (Sandbox Code Playgroud)

字典f是临时的,我想将其值存储在另一个字典中,但是一旦我清除()它,字典行中的值就会丢失,我猜它会提供某种引用.不知道怎么解决这个问题?

c# dictionary

0
推荐指数
1
解决办法
768
查看次数