Project XGallery có rất nhiều thứ cần ajax. Tất nhiên chuyển sang Vue thì sẽ ngon hơn nhiều. Nhưng còn hạn chế kiến thức, thôi thì xài Ajax tạm.
Duolingo – Ajax cheating
Đầu tiên gửi 1 Ajax để lấy list các Skills và các thông tin liên quan https://www.duolingo.com/{2017-06-30}/users/{user-id}?fields=adsConfig,bio,blockedUserIds,canUseModerationTools,courses,creationDate,currentCourse,email,emailAnnouncement,emailAssignment,emailAssignmentComplete,emailClassroomJoin,emailClassroomLeave,emailComment,emailEditSuggested,emailFollow,emailPass,emailWeeklyProgressReport,emailSchoolsAnnouncement,emailStreamPost,emailVerified,emailWeeklyReport,enableMicrophone,enableSoundEffects,enableSpeaker,experiments%7Bacquisition_perimeterx_block_web,acquisition_web_save_credentials_3,courses_la_en_v1,learning_web_autoscroll_placement_test,learning_web_local_grading_v2,learning_web_placement_test_skip,midas_web_full_name_required_2,midas_web_student_plan_rerun,retention_add_more_leagues,retention_remove_streak_lingot_bonus,retention_web_juicify_soft_wall,retention_web_shorter_leaderboard,retention_web_shorter_streak_calendars,retention_web_streak_freeze_used,retention_web_streak_panel,retention_web_update_language_settings,stories_en_from_es_pt_3,web_auto_display_checkpoint_popover,web_lesson_coach_duo,web_smart_tips_apply_rules,web_smart_tips_request_rules%7D,facebookId,fromLanguage,globalAmbassadorStatus,googleId,hasPlus,id,inviteURL,joinedClassroomIds,lastStreak%7BisAvailableForRepair,length%7D,learningLanguage,lingots,location,monthlyXp,name,observedClassroomIds,optionalFeatures,persistentNotifications,picture,plusDiscounts,practiceReminderSettings,privacySettings,referralInfo,requiresParentalConsent,roles,streak,streakData%7Blength%7D,timezone,timezoneOffset,totalXp,trackingProperties,unconsumedGiftIds,username,webNotificationIds,weeklyXp,xpGains,xpGoal,zhTw,_achievements&_=1567952650160 Ajax này sẽ trả về nhiều thứ. Tuy nhiên cái quan tâm là currentCourse.skills.id Tiếp tục là ajax lấy session cho skill tương ứng https://www.duolingo.com/2017-06-30/sessions Ajax này dùng POST và có data là {"fromLanguage":"vi","learningLanguage":"en","challengeTypes":["characterIntro","characterMatch","characterSelect","completeReverseTranslation","definition","dialogue","form","freeResponse","gapFill","judge","listen","name","listenComprehension","listenTap","readComprehension","select","selectPronunciation","selectTranscription","speak","tapCloze","tapComplete","tapDescribe","translate"],"levelIndex":1,"levelSessionIndex":1,"skillId":"8b5996f5b0f1f4fb6320f1e6ac9b91b4","type":"LESSON","juicy":true,"smartTipsVersion":2} Có thể thay skillId... Continue Reading →