Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- self.genStr = function genStr(title, image, lat, lng, portalGuid) {
- console.log(title,image,lat,lng,portalGuid);
- //var href = lat + "," + lng;
- var str= title;
- str = str.replace(/[\u005B-\u0060]/g, function(chr) {
- return "\\u" + ("0000" + chr.charCodeAt(0).toString(16)).substr(-4)
- });
- str = str.replace(/[\u007B-\uFFFF]/g, function(chr) {
- return "\\u" + ("0000" + chr.charCodeAt(0).toString(16)).substr(-4)
- });
- str = str.replace(/[\u0000-\u002F]/g, function(chr) {
- return "\\u" + ("0000" + chr.charCodeAt(0).toString(16)).substr(-4)
- });
- str = str.replace(/[\u003A-\u0040]/g, function(chr) {
- return "\\u" + ("0000" + chr.charCodeAt(0).toString(16)).substr(-4)
- });
- str = str + ";" + image + ";" + portalGuid;
- if (window.plugin.keys && (typeof window.portals[portalGuid] !== "undefined")) {
- var keyCount =window.plugin.keys.keys[portalGuid] || 0;
- str = str + ";" + keyCount;
- }
- console.log(str);
- return str;
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement