diff --git a/WebContent/img/jianshu_logo.png b/WebContent/img/jianshu_logo.png new file mode 100644 index 0000000000000000000000000000000000000000..0a3fe7f582ed0610aaaa6df3bb22c88f1ea965a5 Binary files /dev/null and b/WebContent/img/jianshu_logo.png differ diff --git a/WebContent/index.html b/WebContent/index.html index 95f290e713441a89b692537765a140d618fd7092..3a177a0128892bb2761aa49665e97c7871eef61f 100644 --- a/WebContent/index.html +++ b/WebContent/index.html @@ -1,97 +1,99 @@ - - - - -OSChina.Net 博客搬家 - - - - - - - -
- -

博客搬家

-
-
-
-
- -
-
-

使用说明:

-
    -
  1. 进入某个博客首页,获取地址(例如:http://blog.csdn.net/XXXX)
  2. -
  3. 将博客地址粘贴到MoveBlog输入框,点击“抓取”按钮,系统将自动获取博文目录
  4. -
  5. 勾选要搬家的博文,并进行分类设置
  6. -
  7. 点击确定“按钮”提交上传
  8. -
-

声明:

-

OSCHINA建议只对自己的博文进行搬家,博客文章版权属于作者,受法律保护。未经作者同意请慎重转载

-
-
-
-
    -
  • -
  • -
  • -
  • -
  • -
  • -
  • -
  • -
  • -
-
-
-
-
- - - 抓取 - - - -
-
- - -
-
-
-
- -
- + + + + +OSChina.Net 博客搬家 + + + + + + + +
+ +

博客搬家

+
+
+
+
+ +
+
+

使用说明:

+
    +
  1. 进入某个博客首页,获取地址(例如:http://blog.csdn.net/XXXX)
  2. +
  3. 将博客地址粘贴到MoveBlog输入框,点击“抓取”按钮,系统将自动获取博文目录
  4. +
  5. 勾选要搬家的博文,并进行分类设置
  6. +
  7. 点击确定“按钮”提交上传
  8. +
+

声明:

+

OSCHINA建议只对自己的博文进行搬家,博客文章版权属于作者,受法律保护。未经作者同意请慎重转载

+
+
+
+
    +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
+
+
+
+
+ + + 抓取 + + + +
+
+ + +
+
+
+
+ +
+ \ No newline at end of file diff --git a/WebContent/js/main.js b/WebContent/js/main.js index 4b5c55f52ad86ef27274fdde814e59d82164d4a0..79a4db8d288b25ec9b6203c1f93369b3bc987070 100644 --- a/WebContent/js/main.js +++ b/WebContent/js/main.js @@ -1,490 +1,491 @@ -/*var Conf = { - 'host':'http://www.oschina.net', - 'auth_uri':'/action/oauth2/authorize', - 'response_type':'code', - 'client_id':'c39L0n9Am23s5wTW10dC', - 'redirect_uri':'http://move.pengbo.us/Oauth2Action' -}; - */ - -/*var Conf = { - 'host':'http://www.oschina.com', - 'auth_uri':'/action/oauth2/authorize', - 'response_type':'code', - 'client_id':'yKqX3IQWBvft0W8JXz0k', - 'redirect_uri':'http://www.moveblog.com:8080/Oauth2Action' - }; - */ - -var Conf = { - 'host' : 'http://www.oschina.com', - 'auth_uri' : '/action/oauth2/authorize', - 'response_type' : 'code', - 'client_id' : 'BjvoHIHodS09uBtT6wIx', - 'redirect_uri' : 'http://www.moveblog.com:8080/Oauth2Action' -}; - -var Api = (function(conf, $) { - - var api = {}; - - var uri = { - 'user' : '/action/user', - 'login' : conf.auth_uri + '?response_type=' + conf.response_type - + '&client_id=' + conf.client_id + '&redirect_uri=' - + encodeURIComponent(conf.redirect_uri), - 'blog_list' : '/action/spider', - 'blog_type' : '/action/syscatalog', - 'import_list' : '/action/moveblog' - }; - var blog_tpl = [ - '
  • ', - '', - '', - '', - '', - - '', - '', - '', - '', - '', - '', - '
  • '].join('\n'); - - var getCookie = function(name, value) { - var arr, reg = new RegExp("(^| )" + name + "=([^;]*)(;|$)"); - if (arr = document.cookie.match(reg)) - return unescape(arr[2]); - else - return null; - }; - - var delCookie = function(name) { - var exp = new Date(); - exp.setTime(exp.getTime() - 1); - var cval = getCookie(name); - if (cval != null) - document.cookie = name + "=" + cval + ";expires=" - + exp.toGMTString(); - }; - - var ajax = function(url, callback, data, async) { - return $.ajax({ - url : url, - type : 'POST', - dataType : 'json', - async : typeof async === 'undefined' ? true : async, - data : data, - success : function(response) { - if (response == null) - return; - ajaxErrorHandler(response, callback); - }, - error : callback - }).responseText; - }; - - var ajaxErrorHandler = function(response, callback, onError) { - var data = typeof response === "object" ? response : eval('(' - + response + ')'); - - if (data == null) { - location.reload(); - return; - } - - if (data.status == 500) { - alert('500 服务器内部错误'); - location.reload(); - return; - } - if (data.error) { - if (onError) { - return onError(data); - } - if (data.code == 0) { - alert(data.error); - return; - } else if (data.code == 1) { - delCookie('user'); - location.reload(); - return; - } - } - callback && callback(data); - }; - - var getUserInfo = function(callback) { - var user_id = getCookie('user'); - return ajax(uri.user, callback, { - user_id : user_id - }); - }; - - var doLogin = function() { - location.href = conf.host + uri.login; - }; - - var checkLogin = function() { - return getCookie('user') != null; - }; - - var doLogout = function() { - delCookie('user'); - location.reload(); - }; - - var getBlogList = function(url, callback) { - return ajax(uri.blog_list, callback, { - url : url - }); - }; - - var getBlogType = function(){ - $.getJSON('http://www.moveblog.com:8080/action/syscatalog',function(data){ - var options=""; - $.each(data.blog_sys_catalog_list,function(optionindex,option){ - options = options+ ""; - }); - return options; - },false); - return Options; - }; - - var detectBlogType = function(url) { - var blog_types = [ 'csdn', 'cnblogs', '51cto', 'iteye' ]; - return $.map(blog_types, function(type) { - return url.indexOf(type) > -1 ? type : ''; - }).join(''); - }; - - var generateBlogList = function(arr) { - var ul = $('