Fan Wapego Vào Đây Tiếp Sức Niềm TIn nè

22 bài đăng
02.08.2017 / 19:49
mad
Bài đăng: 2434
Member
Nhào vô cắn tao đi, tao sợ mày à cắn bừa.
HTML5
  1. </style>
  2. <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
  3. <script>
  4. $(function(){
  5. function Mix(){}
  6. Mix.prototype={
  7. OnStart: function(){
  8. $('a:not(.no-load)').unbind().on("click",function(){
  9. Mix.load($(this).attr('href'));
  10. return false;
  11. })
  12. $('form:not(.no-submit)').unbind().on("submit",function(){
  13. if($(this).attr('method')=='post'){
  14. Mix.post($(this).attr('action'), $(this).serialize(), $(this));
  15. }else{
  16. Mix.load($(this).attr('action')+'?'+$(this).serialize());
  17. }
  18. return false;
  19. })
  20. Mix.PushWidth(location.href);
  21. },
  22. load: function(url,script,popstate){
  23. if(script==''){
  24. script='';
  25. }
  26. $.get(url)
  27. .done(function(data, status){
  28. if(status=='success'){
  29. Mix.OnDataPush(data, url, popstate); //Update HTML
  30. }
  31. if(script){
  32. eval(script(data));
  33. }
  34. Mix.OnStart();
  35. })
  36. .error(function(){
  37. //Mix.OnStatus('Có lỗi trong việc tải trang hoặc có vẻ trang này không tồn tại.');
  38. })
  39. },
  40. post: function(url, data, e, popstate){
  41. $.post(url,data)
  42. .done(function(data, status){
  43. if(status=='success'){
  44. Mix.OnDataPush(data, url, popstate);
  45. }
  46. Mix.OnStart();
  47. })
  48. .error(function(){
  49. Mix.OnStatus('Có lỗi trong việc gửi dữ liệu vui lòng thử lại.');
  50. })
  51. },
  52. OnDataPush: function(html, href, popstate){
  53. if(popstate!='OFF'){
  54. Mix.UpdateURL($(html).filter('title').text(), href);
  55. }
  56. $('title').text($(html).filter('title').text());
  57. $('.wcontainer').html($(html).filter('.wcontainer').html());
  58. Mix.PushWidth(href);
  59. },
  60. UpdateURL: function(title, url){
  61. history.pushState('', title, url);
  62. },
  63. PushWidth: function(href){
  64. $('.wcontainer').removeClass().addClass('wcontainer');
  65. if(href.match(/main\.php\?id\=reg/gi) || href.search(/main\.php\?id\=log/gi)){
  66. $('.wcontainer').addClass('max-450')
  67. }
  68. console.log(href)
  69. }
  70. }
  71. Mix=new Mix();
  72. Mix.OnStart();
  73. $(window).bind('popstate',function(){
  74. Mix.load(location.href.replace(location.origin,''),null,'OFF');
  75. })
  76. function rmAds(){
  77. if($('iframe[src*="mobileweb.api.airpush.com"]').length>=0){
  78. $('iframe[src*="mobileweb.api.airpush.com"]').remove()
  79. }
  80. setTimeout(function(){rmAds()}, 500);
  81. }
  82. rmAds()
  83. })
  84. </script>

=))

Code này tối ưu không bị lỗi từ post tới get và load dữ liệu từ link.

Code này thì dán vào cuối ô http://wapego.com/css.php?v=2& ... _edit, http://wapego.com/css.php?v=1& ... _edit

Cám ơn, và điều cuối xóa hết iframe quảng cáo làm lag cả máy

Đã chỉnh sửa. MrKen (21.10.2017 / 13:14)
02.08.2017 / 19:57
mad
Bài đăng: 2434
Member
Nhào vô cắn tao đi, tao sợ mày à cắn bừa.

like cái nào =))

02.08.2017 / 20:10
hanhphucao
Bài đăng: 2469
Admin
Admin là người tận tâm và luôn hành xử đúng mực.

Thiếu <style> ở cuối :gay:

02.08.2017 / 20:11
mad
Bài đăng: 2434
Member
Nhào vô cắn tao đi, tao sợ mày à cắn bừa.

Style vuối chi. Ko thêm cũng ko mất gì

02.08.2017 / 21:15
vipnamdan
Bài đăng: 582
Member
Đẹp trai nhất xóm

Cho vào android đc ko bác :3

03.08.2017 / 06:02
mad
Bài đăng: 2434
Member
Nhào vô cắn tao đi, tao sợ mày à cắn bừa.

Đc mà... dán thử đi

03.08.2017 / 08:31
vipnamdan
Bài đăng: 582
Member
Đẹp trai nhất xóm

Không đc ,đơ luôn bác

04.08.2017 / 06:46
Koollzboy
Bài đăng: 178
Member
Đam Mê Chứ Đell Phải Nghiện

Đơ hết wap...fix lại đi

04.08.2017 / 07:12
mad
Bài đăng: 2434
Member
Nhào vô cắn tao đi, tao sợ mày à cắn bừa.

wap thím là gì

05.08.2017 / 12:21
Koollzboy
Bài đăng: 178
Member
Đam Mê Chứ Đell Phải Nghiện

Đơ wap quá...k dùng dk