1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-15 14:24:51 +00:00

Update core/modules/savers/github.js

Using "$tw.utils.base64Encode()" to encode content of data instead of calling module library directly.
This commit is contained in:
Bram Chen 2019-07-05 11:03:05 +08:00 committed by GitHub
parent f5acf3adaa
commit a06acc4eb8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -12,8 +12,6 @@ Saves wiki by pushing a commit to the GitHub v3 REST API
/*global $tw: false */ /*global $tw: false */
"use strict"; "use strict";
var base64utf8 = require("$:/core/modules/utils/base64-utf8/base64-utf8.module.js");
/* /*
Select the appropriate saver module and set it up Select the appropriate saver module and set it up
*/ */
@ -71,7 +69,7 @@ GitHubSaver.prototype.save = function(text,method,callback) {
} }
var data = { var data = {
message: "Saved by TiddlyWiki", message: "Saved by TiddlyWiki",
content: base64utf8.base64.encode.call(base64utf8,text), content: $tw.utils.base64Encode(text),
branch: branch, branch: branch,
sha: sha sha: sha
}; };