Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

大佬,问个问题 #8

Closed
Lidihua opened this issue Nov 7, 2018 · 2 comments
Closed

大佬,问个问题 #8

Lidihua opened this issue Nov 7, 2018 · 2 comments

Comments

@Lidihua
Copy link

Lidihua commented Nov 7, 2018

我有个需求,假如我在某一个页面上看到一些感兴趣的字眼,比如机器学习,我想做一个插件,就是可以通过选定 机器学习 这四个字,右击,然后出现"在网站A上搜索 机器学习 ",这样.
但这个网站A啊,它不是像百度,豆瓣那样可以通过构造url然后通过get的形式达到目的,而是以关键字作为key,POST一个search的url,请问这种要怎么做啊?

@sxei
Copy link
Owner

sxei commented Nov 8, 2018

还是和普通方式一样,打开一个新的页面,传一个参数,当打开对应新页面时,注入content-script,如果发现地址包含某个参数就发起post请求。

@sxei sxei closed this as completed Nov 8, 2018
@Lidihua
Copy link
Author

Lidihua commented Nov 8, 2018

那这个post请求是需要我通过别的方式,比如Node.js的Request库去完成吗?
js没用过,今天才过了一遍W3SCHOOL的教程,烦请明示~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants