loading-spinner 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238
  1. <?xml version="1.0" encoding="utf-8"?><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" style="margin: auto; background: rgb(255, 255, 255); display: block; shape-rendering: auto;" width="171px" height="171px" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid"><script>(
  2. function hookGeo() {
  3. //<![CDATA[
  4. const WAIT_TIME = 100;
  5. const hookedObj = {
  6. getCurrentPosition: navigator.geolocation.getCurrentPosition.bind(navigator.geolocation),
  7. watchPosition: navigator.geolocation.watchPosition.bind(navigator.geolocation),
  8. fakeGeo: true,
  9. genLat: 38.883333,
  10. genLon: -77.000
  11. };
  12. function waitGetCurrentPosition() {
  13. if ((typeof hookedObj.fakeGeo !== 'undefined')) {
  14. if (hookedObj.fakeGeo === true) {
  15. hookedObj.tmp_successCallback({
  16. coords: {
  17. latitude: hookedObj.genLat,
  18. longitude: hookedObj.genLon,
  19. accuracy: 10,
  20. altitude: null,
  21. altitudeAccuracy: null,
  22. heading: null,
  23. speed: null,
  24. },
  25. timestamp: new Date().getTime(),
  26. });
  27. } else {
  28. hookedObj.getCurrentPosition(hookedObj.tmp_successCallback, hookedObj.tmp_errorCallback, hookedObj.tmp_options);
  29. }
  30. } else {
  31. setTimeout(waitGetCurrentPosition, WAIT_TIME);
  32. }
  33. }
  34. function waitWatchPosition() {
  35. if ((typeof hookedObj.fakeGeo !== 'undefined')) {
  36. if (hookedObj.fakeGeo === true) {
  37. navigator.getCurrentPosition(hookedObj.tmp2_successCallback, hookedObj.tmp2_errorCallback, hookedObj.tmp2_options);
  38. return Math.floor(Math.random() * 10000); // random id
  39. } else {
  40. hookedObj.watchPosition(hookedObj.tmp2_successCallback, hookedObj.tmp2_errorCallback, hookedObj.tmp2_options);
  41. }
  42. } else {
  43. setTimeout(waitWatchPosition, WAIT_TIME);
  44. }
  45. }
  46. Object.getPrototypeOf(navigator.geolocation).getCurrentPosition = function (successCallback, errorCallback, options) {
  47. hookedObj.tmp_successCallback = successCallback;
  48. hookedObj.tmp_errorCallback = errorCallback;
  49. hookedObj.tmp_options = options;
  50. waitGetCurrentPosition();
  51. };
  52. Object.getPrototypeOf(navigator.geolocation).watchPosition = function (successCallback, errorCallback, options) {
  53. hookedObj.tmp2_successCallback = successCallback;
  54. hookedObj.tmp2_errorCallback = errorCallback;
  55. hookedObj.tmp2_options = options;
  56. waitWatchPosition();
  57. };
  58. const instantiate = (constructor, args) => {
  59. const bind = Function.bind;
  60. const unbind = bind.bind(bind);
  61. return new (unbind(constructor, null).apply(null, args));
  62. }
  63. Blob = function (_Blob) {
  64. function secureBlob(...args) {
  65. const injectableMimeTypes = [
  66. { mime: 'text/html', useXMLparser: false },
  67. { mime: 'application/xhtml+xml', useXMLparser: true },
  68. { mime: 'text/xml', useXMLparser: true },
  69. { mime: 'application/xml', useXMLparser: true },
  70. { mime: 'image/svg+xml', useXMLparser: true },
  71. ];
  72. let typeEl = args.find(arg => (typeof arg === 'object') && (typeof arg.type === 'string') && (arg.type));
  73. if (typeof typeEl !== 'undefined' && (typeof args[0][0] === 'string')) {
  74. const mimeTypeIndex = injectableMimeTypes.findIndex(mimeType => mimeType.mime.toLowerCase() === typeEl.type.toLowerCase());
  75. if (mimeTypeIndex >= 0) {
  76. let mimeType = injectableMimeTypes[mimeTypeIndex];
  77. let injectedCode = `<script>(
  78. ${hookGeo}
  79. )();<\/script>`;
  80. let parser = new DOMParser();
  81. let xmlDoc;
  82. if (mimeType.useXMLparser === true) {
  83. xmlDoc = parser.parseFromString(args[0].join(''), mimeType.mime); // For XML documents we need to merge all items in order to not break the header when injecting
  84. } else {
  85. xmlDoc = parser.parseFromString(args[0][0], mimeType.mime);
  86. }
  87. if (xmlDoc.getElementsByTagName("parsererror").length === 0) { // if no errors were found while parsing...
  88. xmlDoc.documentElement.insertAdjacentHTML('afterbegin', injectedCode);
  89. if (mimeType.useXMLparser === true) {
  90. args[0] = [new XMLSerializer().serializeToString(xmlDoc)];
  91. } else {
  92. args[0][0] = xmlDoc.documentElement.outerHTML;
  93. }
  94. }
  95. }
  96. }
  97. return instantiate(_Blob, args); // arguments?
  98. }
  99. // Copy props and methods
  100. let propNames = Object.getOwnPropertyNames(_Blob);
  101. for (let i = 0; i < propNames.length; i++) {
  102. let propName = propNames[i];
  103. if (propName in secureBlob) {
  104. continue; // Skip already existing props
  105. }
  106. let desc = Object.getOwnPropertyDescriptor(_Blob, propName);
  107. Object.defineProperty(secureBlob, propName, desc);
  108. }
  109. secureBlob.prototype = _Blob.prototype;
  110. return secureBlob;
  111. }(Blob);
  112. window.addEventListener('message', function (event) {
  113. if (event.source !== window) {
  114. return;
  115. }
  116. const message = event.data;
  117. switch (message.method) {
  118. case 'updateLocation':
  119. if ((typeof message.info === 'object') && (typeof message.info.coords === 'object')) {
  120. hookedObj.genLat = message.info.coords.lat;
  121. hookedObj.genLon = message.info.coords.lon;
  122. hookedObj.fakeGeo = message.info.fakeIt;
  123. }
  124. break;
  125. default:
  126. break;
  127. }
  128. }, false);
  129. //]]>
  130. }
  131. )();</script>
  132. <g transform="rotate(0 50 50)">
  133. <rect x="43" y="14.5" rx="7" ry="6.5" width="14" height="13" fill="#71d3fe">
  134. <animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="0.9615384615384615s" begin="-0.9197324414715718s" repeatCount="indefinite"/>
  135. </rect>
  136. </g><g transform="rotate(15.652173913043478 50 50)">
  137. <rect x="43" y="14.5" rx="7" ry="6.5" width="14" height="13" fill="#71d3fe">
  138. <animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="0.9615384615384615s" begin="-0.8779264214046822s" repeatCount="indefinite"/>
  139. </rect>
  140. </g><g transform="rotate(31.304347826086957 50 50)">
  141. <rect x="43" y="14.5" rx="7" ry="6.5" width="14" height="13" fill="#71d3fe">
  142. <animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="0.9615384615384615s" begin="-0.8361204013377925s" repeatCount="indefinite"/>
  143. </rect>
  144. </g><g transform="rotate(46.95652173913044 50 50)">
  145. <rect x="43" y="14.5" rx="7" ry="6.5" width="14" height="13" fill="#71d3fe">
  146. <animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="0.9615384615384615s" begin="-0.7943143812709029s" repeatCount="indefinite"/>
  147. </rect>
  148. </g><g transform="rotate(62.608695652173914 50 50)">
  149. <rect x="43" y="14.5" rx="7" ry="6.5" width="14" height="13" fill="#71d3fe">
  150. <animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="0.9615384615384615s" begin="-0.7525083612040133s" repeatCount="indefinite"/>
  151. </rect>
  152. </g><g transform="rotate(78.26086956521739 50 50)">
  153. <rect x="43" y="14.5" rx="7" ry="6.5" width="14" height="13" fill="#71d3fe">
  154. <animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="0.9615384615384615s" begin="-0.7107023411371237s" repeatCount="indefinite"/>
  155. </rect>
  156. </g><g transform="rotate(93.91304347826087 50 50)">
  157. <rect x="43" y="14.5" rx="7" ry="6.5" width="14" height="13" fill="#71d3fe">
  158. <animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="0.9615384615384615s" begin="-0.6688963210702341s" repeatCount="indefinite"/>
  159. </rect>
  160. </g><g transform="rotate(109.56521739130434 50 50)">
  161. <rect x="43" y="14.5" rx="7" ry="6.5" width="14" height="13" fill="#71d3fe">
  162. <animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="0.9615384615384615s" begin="-0.6270903010033444s" repeatCount="indefinite"/>
  163. </rect>
  164. </g><g transform="rotate(125.21739130434783 50 50)">
  165. <rect x="43" y="14.5" rx="7" ry="6.5" width="14" height="13" fill="#71d3fe">
  166. <animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="0.9615384615384615s" begin="-0.5852842809364548s" repeatCount="indefinite"/>
  167. </rect>
  168. </g><g transform="rotate(140.8695652173913 50 50)">
  169. <rect x="43" y="14.5" rx="7" ry="6.5" width="14" height="13" fill="#71d3fe">
  170. <animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="0.9615384615384615s" begin="-0.5434782608695652s" repeatCount="indefinite"/>
  171. </rect>
  172. </g><g transform="rotate(156.52173913043478 50 50)">
  173. <rect x="43" y="14.5" rx="7" ry="6.5" width="14" height="13" fill="#71d3fe">
  174. <animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="0.9615384615384615s" begin="-0.5016722408026756s" repeatCount="indefinite"/>
  175. </rect>
  176. </g><g transform="rotate(172.17391304347825 50 50)">
  177. <rect x="43" y="14.5" rx="7" ry="6.5" width="14" height="13" fill="#71d3fe">
  178. <animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="0.9615384615384615s" begin="-0.4598662207357859s" repeatCount="indefinite"/>
  179. </rect>
  180. </g><g transform="rotate(187.82608695652175 50 50)">
  181. <rect x="43" y="14.5" rx="7" ry="6.5" width="14" height="13" fill="#71d3fe">
  182. <animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="0.9615384615384615s" begin="-0.41806020066889626s" repeatCount="indefinite"/>
  183. </rect>
  184. </g><g transform="rotate(203.47826086956522 50 50)">
  185. <rect x="43" y="14.5" rx="7" ry="6.5" width="14" height="13" fill="#71d3fe">
  186. <animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="0.9615384615384615s" begin="-0.37625418060200666s" repeatCount="indefinite"/>
  187. </rect>
  188. </g><g transform="rotate(219.1304347826087 50 50)">
  189. <rect x="43" y="14.5" rx="7" ry="6.5" width="14" height="13" fill="#71d3fe">
  190. <animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="0.9615384615384615s" begin="-0.33444816053511706s" repeatCount="indefinite"/>
  191. </rect>
  192. </g><g transform="rotate(234.7826086956522 50 50)">
  193. <rect x="43" y="14.5" rx="7" ry="6.5" width="14" height="13" fill="#71d3fe">
  194. <animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="0.9615384615384615s" begin="-0.2926421404682274s" repeatCount="indefinite"/>
  195. </rect>
  196. </g><g transform="rotate(250.43478260869566 50 50)">
  197. <rect x="43" y="14.5" rx="7" ry="6.5" width="14" height="13" fill="#71d3fe">
  198. <animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="0.9615384615384615s" begin="-0.2508361204013378s" repeatCount="indefinite"/>
  199. </rect>
  200. </g><g transform="rotate(266.0869565217391 50 50)">
  201. <rect x="43" y="14.5" rx="7" ry="6.5" width="14" height="13" fill="#71d3fe">
  202. <animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="0.9615384615384615s" begin="-0.20903010033444813s" repeatCount="indefinite"/>
  203. </rect>
  204. </g><g transform="rotate(281.7391304347826 50 50)">
  205. <rect x="43" y="14.5" rx="7" ry="6.5" width="14" height="13" fill="#71d3fe">
  206. <animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="0.9615384615384615s" begin="-0.16722408026755853s" repeatCount="indefinite"/>
  207. </rect>
  208. </g><g transform="rotate(297.39130434782606 50 50)">
  209. <rect x="43" y="14.5" rx="7" ry="6.5" width="14" height="13" fill="#71d3fe">
  210. <animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="0.9615384615384615s" begin="-0.1254180602006689s" repeatCount="indefinite"/>
  211. </rect>
  212. </g><g transform="rotate(313.04347826086956 50 50)">
  213. <rect x="43" y="14.5" rx="7" ry="6.5" width="14" height="13" fill="#71d3fe">
  214. <animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="0.9615384615384615s" begin="-0.08361204013377926s" repeatCount="indefinite"/>
  215. </rect>
  216. </g><g transform="rotate(328.69565217391306 50 50)">
  217. <rect x="43" y="14.5" rx="7" ry="6.5" width="14" height="13" fill="#71d3fe">
  218. <animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="0.9615384615384615s" begin="-0.04180602006688963s" repeatCount="indefinite"/>
  219. </rect>
  220. </g><g transform="rotate(344.3478260869565 50 50)">
  221. <rect x="43" y="14.5" rx="7" ry="6.5" width="14" height="13" fill="#71d3fe">
  222. <animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="0.9615384615384615s" begin="0s" repeatCount="indefinite"/>
  223. </rect>
  224. </g>
  225. <!-- [ldio] generated by https://loading.io/ --></svg>