We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
问题描述 点击分享,报错
Uncaught SyntaxError: Unexpected identifier
kratos.js:241 项目托管:https://github.com/Vtrois/Kratos
1375:141 Uncaught ReferenceError: share is not defined at HTMLAnchorElement.onclick (1375:141)
产生环境
文章中分享部分有双引号的时候,js语法错误,导致无法分享
我觉得可以处理一下双引号来解决这个问题
//var excerpt="这次来了解一下配置文件 composer.json 官方文档 版本符号表示意思(就是>=,~,^这些) 用命令创建一个 { "name": "codfrm/test", //包名 "description": "描述", //包描述 "license": "MIT",//开源协议,例如:MIT,Apache,BSD等 "authors":……"; function share(obj){ var qqShareURL="http://connect.qq.com/widget/shareqq/index.html?"; var weiboShareURL="http://service.weibo.com/share/share.php?"; var facebookShareURL="https://www.facebook.com/sharer/sharer.php?"; var twitterShareURL="https://twitter.com/intent/tweet?"; var googleplusShareURL="https://plus.google.com/share?"; var host_url="https://blog.icodef.com/2018/04/16/1375"; var title="【php composer 包依赖管理工具 - 自动加载 (二)】"; var qqtitle="php composer 包依赖管理工具 - 自动加载 (二)"; var excerpt="这次来了解一下配置文件 composer.json 官方文档 版本符号表示意思(就是>=,~,^这些) 用命令创建一个 { "name": "codfrm/test", //包名 "description": "描述", //包描述 "license": "MIT",//开源协议,例如:MIT,Apache,BSD等 "authors":……"; var pic=""; var _URL; if(obj=="qq"){ _URL=qqShareURL+"url="+host_url+"&title="+qqtitle+"&pics="+pic+"&desc=&summary="+excerpt+"&site=vtrois"; }else if(obj=="weibo"){ _URL=weiboShareURL+"url="+host_url+"&title="+title+excerpt+"&pic="+pic; }else if(obj=="facebook"){ _URL=facebookShareURL+"u="+host_url; }else if(obj=="twitter"){ _URL=twitterShareURL+"text="+title+excerpt+"&url="+host_url; }else if(obj=="googleplus"){ _URL=googleplusShareURL+"url="+host_url; } window.open(_URL); }
The text was updated successfully, but these errors were encountered:
[Fix] The share url #52
fd767a4
问题修复了
Sorry, something went wrong.
No branches or pull requests
问题描述
点击分享,报错
Uncaught SyntaxError: Unexpected identifier
kratos.js:241 项目托管:https://github.com/Vtrois/Kratos
1375:141 Uncaught ReferenceError: share is not defined
at HTMLAnchorElement.onclick (1375:141)
产生环境
文章中分享部分有双引号的时候,js语法错误,导致无法分享
我觉得可以处理一下双引号来解决这个问题
The text was updated successfully, but these errors were encountered: