--- /dev/null
+Thu May 23 22:10:24 CST 2013 <moeallenz@gmail.com>
+* Changed user's url from t.co to original ones
+
+Fri May 17 01:29:07 CST 2013 <shadowglen@me.com>
+* Added an option to switch nickname/username
+
+Sun May 12 15:20:14 CST 2013 <shadowglen@me.com>
+* Fixed some call-time pass-by-reference bug
+* Now user's screen_name can be shown without mcrypt module, but it may be not correct
+
+Mon Mar 11 14:15:15 CST 2013 <shadowglen@me.com>
+* Changed max_id calculation to using bcmath module
+
+Sun Mar 10 21:49:40 CST 2013 <shadowglen@me.com>
+* Fixed "unable to load text box in some pages" bug
+
+Sun Mar 10 16:13:05 CST 2013 <shadowglen@me.com>
+* Changed lists create/edit function to ajax style
+
+Sat Mar 9 22:17:51 CST 2013 <shadowglen@me.com>
+* Fixed member deletion function of list
+
+Sat Mar 9 17:55:22 CST 2013 <shadowglen@me.com>
+* Changed lists adding members function to ajax style
+
+Sat Mar 9 15:16:16 CST 2013 <shadowglen@me.com>
+* Fixed lists created by user page
+* Fixed protection option on list create/edit form
+
+Fri Mar 8 16:50:44 CST 2013 <shadowglen@me.com>
+* Fixed avatar uploading function
+* Checked js files about sidebar and decided not to regard "Unable to Lock Top" as a bug
+
+Fri Mar 8 00:46:37 CST 2013 <shadowglen@me.com>
+* Fixed API 1.1 format and auto-load in Home page, User page, Profile page, and Replies page
+
+Wed Mar 6 22:03:15 CST 2013 <moeallenz@gmail.com>
+* Fixed auto-load in Fav page
+
+Tue Mar 5 15:28:34 CST 2013 <shadowglen@me.com>
+* Fixed auto-load in List Statuses page and Retweets page
+
+Tue Mar 5 03:12:41 CST 2013 <shadowglen@me.com>
+* Updated jQuery Infinite Scroll plugin to support user-defined Next Page
+* Fixed auto-load in Search and DM pages (Change "Back" link id to "less" to avoid loading the same page)
+
+Mon Mar 4 14:30:47 CST 2013 <shadowglen@me.com>
+* Updated search page to API 1.1
+
+Sun Mar 3 02:39:50 CST 2013 <shadowglen@me.com>
+* Changed update_with_media function into API 1.1 format
+
+Sat Mar 2 23:13:54 CST 2013 <moeallenz@gmail.com>
+* Updated embr version to 0.6.1(f-91)
+
+Sat Mar 2 23:00:30 CST 2013 <moeallenz@gmail.com>
+* Fixed user profile page
+
+Sat Mar 2 21:20:43 CST 2013 <shadowglen@me.com>
+* Initial log
--- /dev/null
+ GNU GENERAL PUBLIC LICENSE
+ Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The GNU General Public License is a free, copyleft license for
+software and other kinds of works.
+
+ The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works. By contrast,
+the GNU General Public License is intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users. We, the Free Software Foundation, use the
+GNU General Public License for most of our software; it applies also to
+any other work released this way by its authors. You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
+
+ To protect your rights, we need to prevent others from denying you
+these rights or asking you to surrender the rights. Therefore, you have
+certain responsibilities if you distribute copies of the software, or if
+you modify it: responsibilities to respect the freedom of others.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must pass on to the recipients the same
+freedoms that you received. You must make sure that they, too, receive
+or can get the source code. And you must show them these terms so they
+know their rights.
+
+ Developers that use the GNU GPL protect your rights with two steps:
+(1) assert copyright on the software, and (2) offer you this License
+giving you legal permission to copy, distribute and/or modify it.
+
+ For the developers' and authors' protection, the GPL clearly explains
+that there is no warranty for this free software. For both users' and
+authors' sake, the GPL requires that modified versions be marked as
+changed, so that their problems will not be attributed erroneously to
+authors of previous versions.
+
+ Some devices are designed to deny users access to install or run
+modified versions of the software inside them, although the manufacturer
+can do so. This is fundamentally incompatible with the aim of
+protecting users' freedom to change the software. The systematic
+pattern of such abuse occurs in the area of products for individuals to
+use, which is precisely where it is most unacceptable. Therefore, we
+have designed this version of the GPL to prohibit the practice for those
+products. If such problems arise substantially in other domains, we
+stand ready to extend this provision to those domains in future versions
+of the GPL, as needed to protect the freedom of users.
+
+ Finally, every program is threatened constantly by software patents.
+States should not allow patents to restrict development and use of
+software on general-purpose computers, but in those that do, we wish to
+avoid the special danger that patents applied to a free program could
+make it effectively proprietary. To prevent this, the GPL assures that
+patents cannot be used to render the program non-free.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ TERMS AND CONDITIONS
+
+ 0. Definitions.
+
+ "This License" refers to version 3 of the GNU General Public License.
+
+ "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+
+ "The Program" refers to any copyrightable work licensed under this
+License. Each licensee is addressed as "you". "Licensees" and
+"recipients" may be individuals or organizations.
+
+ To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy. The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
+
+ A "covered work" means either the unmodified Program or a work based
+on the Program.
+
+ To "propagate" a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy. Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
+
+ To "convey" a work means any kind of propagation that enables other
+parties to make or receive copies. Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.
+
+ An interactive user interface displays "Appropriate Legal Notices"
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License. If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.
+
+ 1. Source Code.
+
+ The "source code" for a work means the preferred form of the work
+for making modifications to it. "Object code" means any non-source
+form of a work.
+
+ A "Standard Interface" means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.
+
+ The "System Libraries" of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form. A
+"Major Component", in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.
+
+ The "Corresponding Source" for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities. However, it does not include the work's
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work. For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.
+
+ The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.
+
+ The Corresponding Source for a work in source code form is that
+same work.
+
+ 2. Basic Permissions.
+
+ All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met. This License explicitly affirms your unlimited
+permission to run the unmodified Program. The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work. This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
+
+ You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force. You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright. Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.
+
+ Conveying under any other circumstances is permitted solely under
+the conditions stated below. Sublicensing is not allowed; section 10
+makes it unnecessary.
+
+ 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+ No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.
+
+ When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work's
+users, your or third parties' legal rights to forbid circumvention of
+technological measures.
+
+ 4. Conveying Verbatim Copies.
+
+ You may convey verbatim copies of the Program's source code as you
+receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.
+
+ You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.
+
+ 5. Conveying Modified Source Versions.
+
+ You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these conditions:
+
+ a) The work must carry prominent notices stating that you modified
+ it, and giving a relevant date.
+
+ b) The work must carry prominent notices stating that it is
+ released under this License and any conditions added under section
+ 7. This requirement modifies the requirement in section 4 to
+ "keep intact all notices".
+
+ c) You must license the entire work, as a whole, under this
+ License to anyone who comes into possession of a copy. This
+ License will therefore apply, along with any applicable section 7
+ additional terms, to the whole of the work, and all its parts,
+ regardless of how they are packaged. This License gives no
+ permission to license the work in any other way, but it does not
+ invalidate such permission if you have separately received it.
+
+ d) If the work has interactive user interfaces, each must display
+ Appropriate Legal Notices; however, if the Program has interactive
+ interfaces that do not display Appropriate Legal Notices, your
+ work need not make them do so.
+
+ A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+"aggregate" if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation's users
+beyond what the individual works permit. Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.
+
+ 6. Conveying Non-Source Forms.
+
+ You may convey a covered work in object code form under the terms
+of sections 4 and 5, provided that you also convey the
+machine-readable Corresponding Source under the terms of this License,
+in one of these ways:
+
+ a) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by the
+ Corresponding Source fixed on a durable physical medium
+ customarily used for software interchange.
+
+ b) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by a
+ written offer, valid for at least three years and valid for as
+ long as you offer spare parts or customer support for that product
+ model, to give anyone who possesses the object code either (1) a
+ copy of the Corresponding Source for all the software in the
+ product that is covered by this License, on a durable physical
+ medium customarily used for software interchange, for a price no
+ more than your reasonable cost of physically performing this
+ conveying of source, or (2) access to copy the
+ Corresponding Source from a network server at no charge.
+
+ c) Convey individual copies of the object code with a copy of the
+ written offer to provide the Corresponding Source. This
+ alternative is allowed only occasionally and noncommercially, and
+ only if you received the object code with such an offer, in accord
+ with subsection 6b.
+
+ d) Convey the object code by offering access from a designated
+ place (gratis or for a charge), and offer equivalent access to the
+ Corresponding Source in the same way through the same place at no
+ further charge. You need not require recipients to copy the
+ Corresponding Source along with the object code. If the place to
+ copy the object code is a network server, the Corresponding Source
+ may be on a different server (operated by you or a third party)
+ that supports equivalent copying facilities, provided you maintain
+ clear directions next to the object code saying where to find the
+ Corresponding Source. Regardless of what server hosts the
+ Corresponding Source, you remain obligated to ensure that it is
+ available for as long as needed to satisfy these requirements.
+
+ e) Convey the object code using peer-to-peer transmission, provided
+ you inform other peers where the object code and Corresponding
+ Source of the work are being offered to the general public at no
+ charge under subsection 6d.
+
+ A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.
+
+ A "User Product" is either (1) a "consumer product", which means any
+tangible personal property which is normally used for personal, family,
+or household purposes, or (2) anything designed or sold for incorporation
+into a dwelling. In determining whether a product is a consumer product,
+doubtful cases shall be resolved in favor of coverage. For a particular
+product received by a particular user, "normally used" refers to a
+typical or common use of that class of product, regardless of the status
+of the particular user or of the way in which the particular user
+actually uses, or expects or is expected to use, the product. A product
+is a consumer product regardless of whether the product has substantial
+commercial, industrial or non-consumer uses, unless such uses represent
+the only significant mode of use of the product.
+
+ "Installation Information" for a User Product means any methods,
+procedures, authorization keys, or other information required to install
+and execute modified versions of a covered work in that User Product from
+a modified version of its Corresponding Source. The information must
+suffice to ensure that the continued functioning of the modified object
+code is in no case prevented or interfered with solely because
+modification has been made.
+
+ If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information. But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).
+
+ The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates
+for a work that has been modified or installed by the recipient, or for
+the User Product in which it has been modified or installed. Access to a
+network may be denied when the modification itself materially and
+adversely affects the operation of the network or violates the rules and
+protocols for communication across the network.
+
+ Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.
+
+ 7. Additional Terms.
+
+ "Additional permissions" are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law. If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.
+
+ When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it. (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.) You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.
+
+ Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders of
+that material) supplement the terms of this License with terms:
+
+ a) Disclaiming warranty or limiting liability differently from the
+ terms of sections 15 and 16 of this License; or
+
+ b) Requiring preservation of specified reasonable legal notices or
+ author attributions in that material or in the Appropriate Legal
+ Notices displayed by works containing it; or
+
+ c) Prohibiting misrepresentation of the origin of that material, or
+ requiring that modified versions of such material be marked in
+ reasonable ways as different from the original version; or
+
+ d) Limiting the use for publicity purposes of names of licensors or
+ authors of the material; or
+
+ e) Declining to grant rights under trademark law for use of some
+ trade names, trademarks, or service marks; or
+
+ f) Requiring indemnification of licensors and authors of that
+ material by anyone who conveys the material (or modified versions of
+ it) with contractual assumptions of liability to the recipient, for
+ any liability that these contractual assumptions directly impose on
+ those licensors and authors.
+
+ All other non-permissive additional terms are considered "further
+restrictions" within the meaning of section 10. If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term. If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.
+
+ If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.
+
+ Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions;
+the above requirements apply either way.
+
+ 8. Termination.
+
+ You may not propagate or modify a covered work except as expressly
+provided under this License. Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).
+
+ However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the copyright
+holder fails to notify you of the violation by some reasonable means
+prior to 60 days after the cessation.
+
+ Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+ Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License. If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.
+
+ 9. Acceptance Not Required for Having Copies.
+
+ You are not required to accept this License in order to receive or
+run a copy of the Program. Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance. However,
+nothing other than this License grants you permission to propagate or
+modify any covered work. These actions infringe copyright if you do
+not accept this License. Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.
+
+ 10. Automatic Licensing of Downstream Recipients.
+
+ Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License. You are not responsible
+for enforcing compliance by third parties with this License.
+
+ An "entity transaction" is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations. If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party's predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.
+
+ You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License. For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.
+
+ 11. Patents.
+
+ A "contributor" is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based. The
+work thus licensed is called the contributor's "contributor version".
+
+ A contributor's "essential patent claims" are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version. For
+purposes of this definition, "control" includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
+this License.
+
+ Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor's essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.
+
+ In the following three paragraphs, a "patent license" is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement). To "grant" such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.
+
+ If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients. "Knowingly relying" means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient's use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.
+
+ If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.
+
+ A patent license is "discriminatory" if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License. You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make payment
+to the third party based on the extent of your activity of conveying
+the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory
+patent license (a) in connection with copies of the covered work
+conveyed by you (or copies made from those copies), or (b) primarily
+for and in connection with specific products or compilations that
+contain the covered work, unless you entered into that arrangement,
+or that patent license was granted, prior to 28 March 2007.
+
+ Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.
+
+ 12. No Surrender of Others' Freedom.
+
+ If conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot convey a
+covered work so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you may
+not convey it at all. For example, if you agree to terms that obligate you
+to collect a royalty for further conveying from those to whom you convey
+the Program, the only way you could satisfy both those terms and this
+License would be to refrain entirely from conveying the Program.
+
+ 13. Use with the GNU Affero General Public License.
+
+ Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU Affero General Public License into a single
+combined work, and to convey the resulting work. The terms of this
+License will continue to apply to the part which is the covered work,
+but the special requirements of the GNU Affero General Public License,
+section 13, concerning interaction through a network will apply to the
+combination as such.
+
+ 14. Revised Versions of this License.
+
+ The Free Software Foundation may publish revised and/or new versions of
+the GNU General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+ Each version is given a distinguishing version number. If the
+Program specifies that a certain numbered version of the GNU General
+Public License "or any later version" applies to it, you have the
+option of following the terms and conditions either of that numbered
+version or of any later version published by the Free Software
+Foundation. If the Program does not specify a version number of the
+GNU General Public License, you may choose any version ever published
+by the Free Software Foundation.
+
+ If the Program specifies that a proxy can decide which future
+versions of the GNU General Public License can be used, that proxy's
+public statement of acceptance of a version permanently authorizes you
+to choose that version for the Program.
+
+ Later license versions may give you additional or different
+permissions. However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.
+
+ 15. Disclaimer of Warranty.
+
+ THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
+IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. Limitation of Liability.
+
+ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.
+
+ 17. Interpretation of Sections 15 and 16.
+
+ If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+state the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+Also add information on how to contact you by electronic and paper mail.
+
+ If the program does terminal interaction, make it output a short
+notice like this when it starts in an interactive mode:
+
+ <program> Copyright (C) <year> <name of author>
+ This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, your program's commands
+might be different; for a GUI interface, you would use an "about box".
+
+ You should also get your employer (if you work as a programmer) or school,
+if any, to sign a "copyright disclaimer" for the program, if necessary.
+For more information on this, and how to apply and follow the GNU GPL, see
+<http://www.gnu.org/licenses/>.
+
+ The GNU General Public License does not permit incorporating your program
+into proprietary programs. If your program is a subroutine library, you
+may consider it more useful to permit linking proprietary applications with
+the library. If this is what you want to do, use the GNU Lesser General
+Public License instead of this License. But first, please read
+<http://www.gnu.org/philosophy/why-not-lgpl.html>.
+embrr, a fork from embr
+========
+This is a twitter web client fork from [embr](https://code.google.com/p/embr/), mainly based on `r91` and merged necessary changes until the latest revisions, updated to Twitter REST API `v1.1` and have some improved features.
+
+You can download the zip archive of current version [here](https://github.com/AstroProfundis/embrr/zipball/master) if you don't want to use `git-clone`.
+
How to Install
--------
-The installation of embrj is pretty much the same with embr's, you just need to get the source, rename `config.sample.php` in `/lib` to `config.php`, edit it with your own app information and upload it to your hosting directory.
+The installation of embrr is pretty much the same with embr's, you just need to get the source, rename `config.sample.php` in `/lib` to `config.php`, edit it with your own app information and upload it to your hosting directory.
And here are some tips you may want to know:
- * embrj requires `php-curl` and `php-bcmath`
+ * embrr requires `php-curl` and `php-bcmath`
* while not necessarily required, `php-mcrypt` is recommended
- * embrj is compatible with PHP from version 5.2 to 5.5, we didn't test it on 5.1 or older versions
+ * embrr is compatible with PHP from version 5.2 to 5.5, we didn't test it on 5.1 or older versions
Installing in sub-directory
--------
-If you need to install embrj in a sub-directory of your website, say, in `/embrj`, you'll need to adjust the `.htaccess` file with `/embrj/user.php` and `/embrj/status.php` instead of `/user.php` and `/status.php`.
+If you need to install embrr in a sub-directory of your website, say, in `/embrr`, you'll need to adjust the `.htaccess` file with `/embrr/user.php` and `/embrr/status.php` instead of `/user.php` and `/status.php`.
nginx
--------
}
}
And of course, adjust it if you are in a sub-directory.
+
+Notes
+--------
+If you're having issues changing pages or sending DMs, try modify your `php.ini` as follows:
+
+ precision = 24 ;Use a value lager than 19 to replace the default 14
+
+----
+
+embrr, 一个修改版的 embr
+========
+
+这是一个从 [embr](https://code.google.com/p/embr/) 修改而来的 twitter 网页端,主要基于 `r91` 版本并合并了后续修订版的必要更新,升级到了 Twitter REST API `v1.1` 并有一些功能上的改进。
+
+如果不想使用 `git-clone` 获取代码,可以点[这里](https://github.com/AstroProfundis/embrr/zipball/master)下载当前版本的 zip 压缩包。
+
+安装方法
+--------
+安装 embrr 的方法和 embr 原版基本相同,只需要下载代码包,重命名 `/lib` 中的 `config.sample.php` 文件为 `config.php`, 编辑此配置文件填入适当的 app 信息,再将代码上传至网站空间即可。
+
+有几点值得注意的地方是:
+
+ * embrr 依赖于 `php-curl` 和 `php-bcmath` 组件
+ * 虽然不是必需依赖,但建议安装 `php-mcrypt` 组件
+ * embrr 兼容 PHP 5.2 至 5.5 的版本,我们没有测试过 5.1 及之前版本
+
+在二级目录中安装
+--------
+如果需要将 embrr 安装在二级目录中,例如安装在 `/embrr` 中,则需要修改 `.htaccess` 文件,使用 `/embrr/user.php` 与 `/embrr/status.php` 替换 `/user.php` 和 `/status.php`.
+
+nginx
+--------
+对于 nginx 用户,需要在配置文件中加入以下代码:
+
+ location / {
+ if (!-f $request_filename) {
+ rewrite ^/(\d+)$ /status.php?id=$1 last;
+ rewrite ^/(\w+)$ /user.php?id=$1 last;
+ break;
+ }
+ }
+同样,如果在二级目录中安装则需适当调整。
+
+附注
+--------
+如果翻页或者发送 DM 时遇到问题,尝试在 `php.ini` 中做如下修改:
+
+ precision = 24 ;使用大于 19 的值替换默认值 14
+
+----
+As I'm not an expert of PHP nor twitter API, do expect bugs everywhere.
+
+All helps are welcomed!
+
+请做好 bug 满天飞的心理准备以及欢迎拍砖和协助修改。
--- /dev/null
+* There are lots of bugs when api response is error info
+
+* Profile background image updating function
+
+* Profile timeline needs to be AJAX updated after posting a new tweet
+
+* Clean up messed code.
+
+* Show different message for API outage and no tweets
+
+* Handle API outage on all the pages
case 'destory':
$result = $t->destroyUser($_POST['id']);
break;
+ case 'mute':
+ $result = $t->muteUser($_POST['id']);
+ break;
+ case 'unmute':
+ $result = $t->unmuteUser($_POST['id']);
+ break;
case 'block':
$result = $t->blockUser($_POST['id']);
break;
$user_id = $_GET['uid'];
$reply_to_id = "";
$html = '<div class="ajax_form round">';
- $html .= "<a class=\"close\" title=\"Close\" onclick=\"$(this).parent().slideToggle(300);\" href=\"#\"></a>";
+ $html .= "<a class=\"close fa fa-times\" title=\"Close\" onclick=\"$(this).parent().slideToggle(300);return false;\" href=\"#\"></a>";
$html .= '<ol>';
$html .= formatConversation($_GET['id']);
$html .= '</ol></div>';
$reply_to_id = $user->id;
}
$date = format_time($status->created_at);
- $text = formatEntities($status->entities,$status->text);
+ $text = formatEntities(
+ $status->entities,
+ isset($status->extended_entities) ? $status->extended_entities : null,
+ $status->text);
$end = (!isset($status->in_reply_to_user_id) || ($user_id != $status->in_reply_to_user_id && $reply_to_id != $status->in_reply_to_user_id));
$html = '<li class="round">
<span class="status_author">
</span>
<span class="status_body">
<span class="status_id">'.$status_id.'</span>
- <span class="status_word" style="font-size: 12px;"><a class="user_name" href="user.php?id='.$user->screen_name.'" id="'.$user->screen_name.'">'.($_COOKIE['shownick']=='true' ? $user->name : $user->screen_name).'</a> <span class="tweet">'.$text.'</span></span>
- <span class="status_info" style="font-size: 11px; margin: 0px;">';
+ <span class="status_word" style="font-size: 12px;"><a class="user_name" href="user.php?id='.$user->screen_name.'" id="'.$user->screen_name.'">'.($_COOKIE['shownick']=='true' ? $user->name : $user->screen_name).'</a> <span class="tweet">'.$text['text'].'</span></span>'.
+ '<span class="extended_entities">'.$text['extended'].'</span>'
+ .'<span class="status_info" style="font-size: 11px; margin: 0px;">';
if($end && isset($status->in_reply_to_user_id)){
$html .= '<span class="in_reply_to"> <a class="ajax_reply" href="ajax/status.php?id='.$status->in_reply_to_status_id_str.'&uid='.$user->id.'">in reply to '.$status->in_reply_to_screen_name.'</a></span>';
}
}
$t = getTwitter();
if ( isset($_POST['status']) && isset($_POST['in_reply_to']) ) {
- if (trim($_POST['status']) == '') {
+ if (trim($_POST['status']) == '' &&
+ (!isset($_POST['media_ids']) || trim($_POST['media_ids']) == '')) {
echo 'empty';
exit();
}
- if (get_magic_quotes_gpc()) {
- $result = $t->update(stripslashes($_POST['status']), $_POST['in_reply_to']);
- } else {
- $result = $t->update($_POST['status'], $_POST['in_reply_to']);
+
+ $status = get_magic_quotes_gpc() ? stripslashes($_POST['status']) : $_POST['status'];
+ if(substr($status, 0, 2) !== 'D '){
+ $mediaIds = false;
+ if (isset($_POST['media_ids']) && trim($_POST['media_ids']) != '') {
+ $mediaIds = $_POST['media_ids'];
+ }
+ $result = $t->update($status, $_POST['in_reply_to'], true, $mediaIds);
+ }
+ else{
+ $pieces = explode(" ", $status);
+ $targetId = $pieces[1];
+ $message = substr($status, 3 + strlen($targetId));
+ $result = $t->newDirectMessage($targetId, $message);
}
- if(isset($result->error)){
- if(strpos($result->error, 'duplicate') > 0){
- $tmp = $t->userTimeline();
- $result = $tmp[0];
+
+ if((isset($result->error) && strpos($result->error, 'duplicate') > 0) ||
+ isset($result->recipient)){
+ $tmp = $t->userTimeline();
+ $result = $tmp[0];
+ if(!isset($result->recipient)){
echo 'error';
}
}
+
if(isset($result->user)){
$user = $result->user;
$time = $_SERVER['REQUEST_TIME']+3600*24*365;
- if ($user) {
+ if($user){
setcookie('friends_count', $user->friends_count, $time, '/');
setcookie('statuses_count', $user->statuses_count, $time, '/');
setcookie('followers_count', $user->followers_count, $time, '/');
$user = $status->user;
$date = $status->created_at;
- $text = formatEntities($status->entities,$status->text);
+ $text = formatEntities(
+ $status->entities,
+ isset($status->extended_entities) ? $status->extended_entities : null,
+ $status->text);
- if(strpos("@$t->username", $text) > -1) {
+ if(strpos("@$t->username", $text['text']) > -1) {
if (++$count == count($statuses))
$output = "<li style=\"background-color:#E8FECD;border-bottom:5px solid #CCC\">";
else
</span>
<span class=\"status_body\">
<span class=\"status_id\">$status->id_str </span>
- <span class=\"status_word\"><a class=\"user_name\" href=\"user.php?id=$user->screen_name\" id=\"$user->screen_name\">".($_COOKIE['shownick']=='true' ? $user->name : $user->screen_name)."</a><span class=\"tweet\"> $text </span></span>
- <span class=\"actions\">
- <a class=\"replie_btn\" title=\"Reply\" href=\"a_reply.php?id=$status->id_str\">Reply</a>
- <a class=\"rt_btn\" title=\"Retweet\" href=\"a_rt.php?id=$status->id_str\">RT</a>
- <a class=\"favor_btn\" title=\"Favorite\" href=\"a_favor.php?id=$status->id_str\">Favor</a>";
- if ($user->screen_name == $t->username) $output .= "<a class=\"delete_btn\" title=\"Delete\" href=\"a_del.php?id=$status->id_str&t=s\">Delete</a>";
+ <span class=\"status_word\"><a class=\"user_name\" href=\"user.php?id=$user->screen_name\" id=\"$user->screen_name\">".($_COOKIE['shownick']=='true' ? $user->name : $user->screen_name)."</a><span class=\"tweet\"> ".$text['text']." </span></span>".
+ '<span class="extended_entities">'.$text['extended'].'</span>'
+ ."<span class=\"actions\">
+ <a class=\"replie_btn fa fa-reply\" title=\"Reply\" href=\"a_reply.php?id=$status->id_str\"></a>
+ <a class=\"rt_btn fa fa-share\" title=\"Quote\" href=\"a_rt.php?id=$status->id_str\"></a>
+ <a class=\"favor_btn fa fa-star-o\" title=\"Favorite\" href=\"a_favor.php?id=$status->id_str\"></a>";
+ if ($user->screen_name == $t->username) $output .= "<a class=\"delete_btn fa fa-trash-o\" title=\"Delete\" href=\"a_del.php?id=$status->id_str&t=s\"></a>";
$output .= "</span><span class=\"status_info\">";
if ($status->in_reply_to_status_id_str) $output .= "<span class=\"in_reply_to\"> <a class=\"ajax_reply\" href=\"ajax/status.php?id=$status->in_reply_to_status_id_str&uid=$user->id \">in reply to $status->in_reply_to_screen_name</a></span>";
$output .= "<span class=\"source\">via $status->source</span>
foreach ($trends as $trend) {
$li = '
<li>
- <a href="search.php?q='.$trend->query.'">'.$trend->name.'</a>
+ <a href="search.php?q='.$trend->query.'" target="_blank">'.$trend->name.'</a>
</li>
';
$html .= $li;
case 'image':
if (!isset($_FILES['image'])) break;
$image = "@{$_FILES['image']['tmp_name']};type={$_FILES['image']['type']};filename={$_FILES['image']['name']}";
- $result = imageUpload($image);
- if (isset($result->url)) {
- echo '{"result": "success" , "url" : "' . $result->url . '"}';
- } else {
- echo '{"result": "error"}';
+ $t = getTwitter();
+ $result = $t->uploadMedia($image);
+ if (isset($result->media_id_string)) {
+ echo '{"media_id": "'.$result->media_id_string.'"}';
+ }
+ else {
+ echo '{"media_id": "error"}';
}
break;
case 'profile':
<?php
$statuses = $t->homeTimeline();
if ($statuses === false) {
- header('location: error.php');exit();
+ header('location: error.php?code='.$t->http_code);exit();
}
$empty = count($statuses) == 0? true: false;
if ($empty) {
$statuses = $t->replies();
if ($statuses === false) {
- header('location: error.php');exit();
+ header('location: error.php?code='.$t->http_code);exit();
}
$empty = count($statuses) == 0? true: false;
if ($empty) {
$messages = $t->directMessages();
if ($messages === false) {
- header('location: error.php');exit();
+ header('location: error.php?code='.$t->http_code);exit();
}
$empty = count($messages) == 0? true: false;
if ($empty) {
--- /dev/null
+<?php
+include('lib/twitese.php');
+$title = "Blocking";
+include('inc/header.php');
+if(!loginStatus()){
+ header('location: login.php');
+}
+$type = 'blocks';
+include('inc/userlist.php');
+include('inc/sidebar.php');
+include('inc/footer.php');
+?>
img{border:medium none}
h2{clear:both;display:block;float:left;font-family:'Helvetica Neue','Helvetica','Arial',sans-serif;font-size:20px;font-weight:400;line-height:1.1;margin:8px 0 0 10px;cursor:default}
.wrapper{margin:1em auto;position:relative;width:763px}
-.content-bubble-arrow{background-image:url(../img/arr2.gif);background-position:25px 0;background-repeat:no-repeat;margin-top:1em;padding-top:11px}
+.content-bubble-arrow{height:18px;width:18px;background-color:#fff;transform:rotate(45deg);margin-bottom:-7px;position:relative;top:5px;left:25px}
.columns{margin-bottom:15px;width:100%}
.round{border-radius:5px}
.round-right{border-radius:0 5px 5px 0}
#tweeting_controls{float:right;padding:5px 12px 0 5px}
#tweeting_controls a{line-height:13px}
a.a-btn, a.a-btn:visited{color:#333!important}
-a.a-btn{border-radius:4px;background:url("../img/bg-btn.gif") repeat-x scroll 0 0 #DDD;border-color:#DDD #DDD #CCC!important;border-style:solid;border-width:1px!important;cursor:pointer;display:inline-block;font-family:"lucida grande",helvetica,tahoma,arial;font-size:11px;line-height:14px;padding:4px 8px 5px;text-decoration:none;text-shadow:1px 1px 0 #FFF!important;-moz-transition:all .5s ease-out;-webkit-transition:all .5s ease-out;-ms-transition:all .5s ease-out}
-a.btn-disabled{background-image:none;opacity:0.6}
-a.a-btn-m{border-radius:5px;background-position:0 -200px;font-family:"helvetica neue",arial,sans-serif;font-size:15px;line-height:20px;padding:5px 15px 6px}
+a.a-btn{border-radius:5px;
+background:-webkit-linear-gradient(white,#DDD);
+background:-o-linear-gradient(white,#DDD);
+background:-moz-linear-gradient(white,#DDD);
+background:linear-gradient(white,#DDD);
+border-color:#DDD #DDD #CCC!important;border-style:solid;border-width:1px!important;cursor:pointer;display:inline-block;font-family:"helvetica neue",arial,sans-serif;font-size:15px;line-height:20px;padding:5px 15px 6px;text-decoration:none;text-shadow:1px 1px 0 #FFF!important;-moz-transition:all .5s ease-out;-webkit-transition:all .5s ease-out;-ms-transition:all .5s ease-out}
+a.btn-disabled{opacity:0.6;cursor:default;background:#DDD}
a.a-btn:hover, a.a-btn:focus{border-color:#999 #999 #888!important;color:#000;outline:medium none;text-decoration:none}
-a.a-btn:active{background-image:none;outline:medium none}
+a.a-btn:active{outline:medium none}
/*legacy below*/
#statuses,#ajax_statuses{background-color:#FFF;float:left;padding:10px;width:544px}
#statuses form{margin-bottom:10px}
#tip{color:#CCC;float:right;font-size:24px;margin:5px 10px 0 0;font-family:'Helvetica Neue','Helvetica','Arial',sans-serif}
-#tip.loading{background:url("../img/spinner.gif") no-repeat scroll center center transparent!important;color:transparent!important}
#textbox{border-radius:3px;border:1px solid #A7A6AA;font-size:14px;height:80px;margin:2px 0 5px 10px;overflow-x:hidden;overflow-y:auto;padding:5px;width:510px;-webkit-transition:all .5s ease-out;-moz-transition:all .5s ease-out;-ms-transition:all .5s ease-out}
textarea#textbox:focus{outline:none;border:1px solid rgba(82,168,236,.75)!important;box-shadow:0 0 8px rgba(82,168,236,.5)!important;-webkit-box-shadow:0 0 8px rgba(82,168,236,.5)!important}
textarea#textbox:hover{outline:none;border:1px solid rgba(167,166,170,.75);box-shadow:0 0 5px rgba(167,166,170,.5);-webkit-box-shadow:0 0 8px rgba(167,166,170,.5)}
-#submit_btn,.submit_btn{background:transparent url(../img/round-btn.gif) repeat scroll 0 0;border:medium none;color:#666;float:right;font-size:14px;height:32px;margin:5px 13px 0 0;width:115px}
-#submit_btn:hover,#login_btn:hover,#rank_addtag_btn:hover,.submit_btn:hover{background:transparent url(../img/round-btn.gif) repeat scroll 0 32px;color:#444;cursor:pointer}
-#submit_btn:active{color:#000;cursor:pointer}
-#func_set{clear:left;display:block;float:left;left:190px;position:absolute;top:33px}
-.func_btn{background-image:url("../img/ui_icons.png");background-color:#FFF;border-radius:3px;border:1px solid #ADADAD;color:#75715E;display:block;float:left;font-size:11px;margin:0 -5px 0 10px;text-align:center;text-decoration:none;text-indent:-9999em;height:16px;width:20px;cursor:pointer}
+#func_set{clear:left;display:block;float:left;position:absolute;top:33px}
+.func_btn{background-color:#FFF;border-radius:3px;border:1px solid #ADADAD;color:#ADADAD;padding-top:2px;float:left;margin:0 -5px 0 10px;text-align:center;text-decoration:none;height:13px;width:20px;cursor:pointer;font-size:12px}
.func_btn:hover{background-color:#F2F2F2;text-decoration:none}
-#transRecover{border-radius:0 0 0 3px;display:none;background-color:#FFF;background-image:url("../img/ui_icons.png");border:1px solid #ADADAD;color:#75715E;cursor:pointer;float:left;font-size:11px;height:16px;margin:0 -5px 0 10px;text-align:center;text-decoration:none;text-indent:-9999em;background-position:-32px -64px;bottom:58px;left:515px;position:absolute;top:58px;width:15px}
-#transRecover:hover{background-color:#F2F2F2;text-decoration:none}
-#photoArea,#transArea,#filterArea,#symArea{border-radius:3px;background:#F5F5F5 none repeat scroll 0 0;border:1px solid #A7A6AA;clear:both;display:none;height:20px;left:20px;padding:10px 10px 60px;position:absolute;top:58px;width:500px}
+.func_btn.func_enabled{color:#7A7A7A}
+#photoArea,#filterArea,#symArea{border-radius:3px;background:#F5F5F5 none repeat scroll 0 0;border:1px solid #A7A6AA;clear:both;display:none;height:20px;left:20px;padding:10px 10px 60px;position:absolute;top:58px;width:500px}
#symArea{overflow-x:hidden;overflow-y:auto}
#symArea span{border-radius:3px;background-color:#EEE;border:1px solid transparent;color:#000;display:block;float:left;font-size:12px;line-height:18px;margin:0 10px 5px 0;min-width:60px;padding:1px 2px;text-align:center;white-space:nowrap}
#symArea span:hover{border:1px solid #666;cursor:pointer}
#filterArea .filter_input{border:1px solid #A7A6AA;font-size:13px;height:17px;margin:10px 0 5px;padding:3px 2px;width:300px}
-.close{background:transparent url(../img/sprite-icons.png) no-repeat scroll -272px -16px;text-decoration:none;position:absolute;top:10px;right:10px;height:10px;width:9px}
+.close{color:#adadad;position:absolute;top:10px;right:10px;height:10px;width:9px}
+a.close:hover{text-decoration:none!important}
#sent_function{float:left;margin:4px 0 0 10px}
-#imageFile{margin:10px 0;padding:2px}
-#autoBtn.pause{background-position:-15px -160px}
-#autoBtn.start{background-position:1px -160px}
+#imageFile{padding:2px}
#currently{color:#666;float:left;font-size:11px!important;margin:3px 8px 0 10px;overflow:hidden;padding:2px 4px 2px 0;text-align:left;width:385px;word-wrap:break-word;cursor:pointer}
.status-text a{color:#666}
#latest_meta a{color:#999}
/*tips*/
#shortcutTip{border-radius:5px;border:2px solid #FFF;color:#FFF;cursor:default;display:block;font-size:20px;font-weight:700;left:20px;opacity:0.8;padding:8px 16px;position:fixed;top:20px}
-#sentTip{background:#FFF;border-radius:0 0 5px 5px;font-size:11px!important;font-weight:700;left:auto;right:auto;padding:4px 0 6px;margin:-1px 0 0 233px;position:fixed;text-align:center;top:0;width:300px;min-height:13px;z-index:1000;opacity:0.8}
-.ing{color:#2276BB}
-.success{color:green}
-.failure{color:red}
+#sentTip{height:0px;overflow:hidden;background:#FFF;border-radius:0 0 5px 5px;border-style:solid;border-color:transparent;border-width:0px;
+font-size:11px!important;font-weight:700;left:auto;right:auto;margin:-1px 0 0 233px;position:fixed;text-align:center;top:0;width:300px;z-index:1000;opacity:0.8;
+transition-property:height,border-width,color;transition-duration:400ms,0,0;transition-timing-function:linear,ease,ease;transition-delay:0,400ms,400ms;}
+#sentTip.shown{transition-property:height,border-width,color;transition-duration:400ms,0,0;transition-timing-function:linear,ease,ease;transition-delay:0,0,0;
+padding:4px 0 6px;height:1em;border-width:1px;
+}
+#sentTip.ing{color:#2276BB;}
+#sentTip.success{color:green;}
+#sentTip.failure{color:red;}
/*timeline*/
#allTimeline,#allReplies,#allMessage{margin:10px;padding:0;clear:both}
.timeline embed{margin:10px 0 0 10px}
+.extended_entities{display:none}
.tweetcount{display:inline}
.new{background-color:#E3F1FA;color:#858585;display:none;float:left;font-size:11px;text-align:center;width:522px}
.mine{display:none;background-color:#E8FFED}
.reply{background-color:#E8FECD}
.filter{background-color:#FFC}
.retweet{background-color:#FFFFE5}
-.faved{background:transparent url(../img/sprite-icons.png) no-repeat scroll -64px 0;height:15px;width:15px!important;display:inline-block;outline:medium none;overflow:hidden;position:absolute;top:10px;margin-left:500px}
+.faved{height:15px;width:15px!important;outline:medium none;overflow:hidden;position:absolute;top:10px;margin-left:500px;color:#ffac33}
.user_name{font-weight:700}
.timeline{margin:0 10px}
.timeline li{border-top:1px solid #EFEFEF;cursor:default;display:block;float:left;margin:0;overflow:visible;padding:10px 25px 5px 2px;position:relative;width:497px;-moz-transition:all .5s ease-out;-webkit-transition:all .5s ease-out}
.timeline li:hover .actions{display:inline}
-.ajax_timeline li{cursor:default;display:block;float:left;margin:0;overflow:visible;padding:5px 0;width:520px;position:relative}
-.ajax_timeline li .status_body{margin-left:50px!important;margin-right:5px!important}
.status_body{display:block;line-height:22px;margin-left:60px;overflow:hidden;position:relative}
.status_info{color:#999;display:block;font-size:11px;height:22px;margin:5px 0 0;overflow:hidden;text-align:left;width:100%}
.status_info a{color:#999;font-size:11px;text-decoration:none}
#empty{font-size:16px;font-weight:700;margin:50px;text-align:center}
#description{font-size:14px;padding:10px}
#description p{line-height:22px;margin:15px}
-.big-retweet-icon{background-image:url(../img/sprite-icons.png);background-position:-128px -64px;background-repeat:no-repeat;display:inline-block;height:14px;position:relative;top:2px;width:18px}
+.big-retweet-icon{background-color:#adadad;color:#ffffff;text-align:center;display:inline-block;height:14px;position:relative;top:2px;width:18px}
/*new below*/
.ajax_form{background-color:#FFF;border:1px solid #A7A6AA;float:left;margin:5px 0 5px -1px;padding:0;width:520px}
.ajax_form li{border-top:1px solid #EFEFEF;cursor:default;display:block;float:left;margin:0;overflow:visible;padding:5px 25px 5px 0;position:relative;width:495px}
.ajax_form li .status_body{display:block;line-height:22px;margin-left:50px;margin-right:5px;overflow:hidden;position:relative}
/*pagination*/
#pagination{margin:5px}
-#pagination p.no-more-tweets{font-size:1.1em;text-align:center}
-.more{background-color:#FFF;background-image:url(../img/more.gif);background-position:left top;background-repeat:repeat-x;border-color:#DDD #AAA #AAA #DDD;border-style:solid;border-width:1px;display:block;font-size:14px;font-weight:700;height:22px;line-height:1.5em;margin-bottom:6px;outline-color:0;outline-style:none;outline-width:medium;padding:6px 0;text-align:center;text-shadow:1px 1px 1px #FFF;width:45%}
-.more:hover{background-position:left -78px;border:1px solid #bbb;text-decoration:none}
-.more:active{background-position:left -38px;color:#666}
-.more.loading{background-color:#fff;background-image:url(../img/ajax.gif);background-position:50% 50%;background-repeat:no-repeat;border:1px solid #eee;cursor:default!important}
-.more::-moz-focus-inner{border:0}
-#pagination.pagination{height:1.5em}
-#pagination.pagination a,#pagination.pagination .link-like{border:1px solid #cecece;float:right;margin:0 0 0 10px;padding:.25em 1em}
+#pagination a{margin:20px auto 6px;width:25%;text-align:center}
+#pagination a:hover{text-decoration:none}
/*sidebar*/
#side_base{border-radius:0 5px 5px 0;background-color:#DDEEF6;border-left:1px solid #C0DEED;line-height:1.2;vertical-align:top;width:198px}
#sideimg{float:left;margin:10px 10px 10px 15px;height:40px;width:40px;border-radius:5px;box-shadow:0 1px 2px rgba(0,0,0,.25);-webkit-box-shadow:0 1px 2px rgba(0,0,0,.25)}
#sideid{display:block;padding:10px 0 0 18px;margin-bottom:5px}
#side_name{font:bold 1.3em/1.3em Helvetica Neue,Helvetica,sans-serif;color:#2276BB;margin-right:1px}
-#profileRefresh i{background:url(../img/refresh.png) no-repeat;width:16px;height:16px;display:inline-block}
-.refreshing i{background:url(../img/ajax.gif)!important}
+#profileRefresh{color:#ADADAD;font-size:11px;text-decoration:none}
+#profileRefresh:hover{color:#333}
#me_tweets{font-family:Helvetica,Arial,sans-serif;font-size:90%}
#update_count{font-weight:700}
#user_stats{clear:both;padding:0 0 0 10px}
#indicator{cursor:pointer}
#tip_reset{text-decoration:underline;cursor:pointer}
#tip_reset:hover{color:red}
-#sidebarTip_more{display:none}
+#sidebarTip_more{display:none;width:100%}
#side .notice{background-color:#FFF;margin:.5em auto 1em;padding:10px;text-align:center}
#side div.section{padding:13px}
#side div#profile.section{margin-bottom:0;padding:.2em}
#side span.view-all{display:inline;margin:0}
#side span.pipe{border-left:1px solid #C0DEED;padding-left:4px;padding-right:4px}
#side #following span.xref{display:block;margin-top:-5px;padding:0 14px 5px}
-h2.sidebar-title{font-size:1.05em;font-weight:400;padding:.2em 14px}
-h2.sidebar-subtitle{font-size:1.3em;font-weight:400;padding:.2em 14px}
-#side .collapsible h2.sidebar-title{background:transparent url(../img/toggle_up_dark.png) no-repeat scroll right center;width:157px}
-#side .collapsible.collapsed h2.sidebar-title{background:transparent url(../img/toggle_down_dark.png) no-repeat scroll right center}
-#side div.collapsible.loading h2.sidebar-title{background-clip:border!important;-moz-background-inline-policy:continuous!important;background-origin:padding!important;background:transparent url(../img/spinner.gif) no-repeat scroll right center!important}
#side .actions{border:1px solid #87BC44;margin:10px -3px}
#side .actions small{font-size:.9em}
#side .actions a{padding-left:7px}
#side .stats td .label{font-size:.9em;text-transform:lowercase}
#side .about li{padding-bottom:3px}
#side .about li#bio{overflow:hidden;width:170px;word-wrap:break-word}
+#side .sidebarTipText{word-wrap:break-word;width:100%}
ul#tabMenu li{border-top:1px solid #BDDCAD}
ul#tabMenu a,#side .section h1{color:#4C4C4C;display:block;font-size:110%;font-weight:700;padding:13px;text-decoration:none}
#side .section h1{padding:0 0 .25em}
#trend_entries, #apiquota_list{display:none;width:177px;float:left;margin-top:5px!important}
#trend_entries li{word-break:break-all}
#trends, #following, #apiquota, #version{margin-left:-2px}
-#trends_title, #following_title, #apiquota_title,#version_title{background:transparent url(../img/toggle_down_dark.png) no-repeat scroll right center;font-weight:400;font-size:110%;padding-left:3px;margin-bottom:0;margin-top:0;width:177px;cursor:pointer}
-#version_title{background:none!important}
-#trends_title.loading, #following_title.loading, #apiquota_title.loading{background:transparent url(../img/spinner.gif) no-repeat scroll right center!important}
-#trends_title.open, #following_title.open, #apiquota_title.open{background:transparent url(../img/toggle_up_dark.png) no-repeat scroll right center!important}
+#trends_title, #following_title, #apiquota_title,#version_title{font-weight:400;font-size:110%;padding-left:3px;margin-bottom:0;margin-top:0;width:177px;cursor:pointer}
+.side_expandable h2 span.fa{display:none;float:right;color:#ADADAD}
+.side_expandable h2:hover span.fa{color:#333}
+.side_expandable h2.closed span.fa.fa-chevron-circle-down,.side_expandable h2.loading span.fa.fa-spinner,.side_expandable h2.open span.fa.fa-chevron-circle-up{display:inline-block}
#following_list{display:none;float:left;padding:10px 10px 0}
#following_list span{float:left;padding:0 3px 2px 2px}
#following_list img{padding:0}
/* =buttons
----------------------------------------*/
.btn::-moz-focus-inner{border:0 none}
-.btn,input.btn[type=submit],input.btn[type=button]{border-radius:4px;background:#DDD url(../img/bg-btn.gif) repeat-x scroll 0 0;border-color:#DDD #DDD #CCC;border-style:solid;border-width:1px;color:#333;font-size-adjust:none;font-stretch:normal;font-style:normal;font-variant:normal;margin:0;overflow:visible;padding:4px 8px 5px;text-shadow:1px 1px 0 #FFF;width:auto;font:400 11px/14px "tahoma";cursor:pointer}
-#btn{border-radius:4px;background:#DDD url(../img/bg-btn.gif) repeat-x scroll 0 0;border-color:#DDD #DDD #CCC;border-style:solid;border-width:1px;color:#333;font-size-adjust:none;font-stretch:normal;font-style:normal;font-variant:normal;margin:0;overflow:visible;padding:4px 5px 5px;text-shadow:1px 1px 0 #FFF;width:auto;font:400 11px/14px "tahoma"}
-.btn:hover,.btn:focus,input.btn[type=submit]:hover,input.btn[type=submit]:focus,input.btn[type=button]:hover,input.btn[type=button]:focus,button.btn:hover,button.btn:focus{background-position:0 -6px;border-color:#999 #999 #888;color:#000}
-.btn:active,.btn:active,input.btn[type=submit]:active,input.btn[type=button]:active,button.btn:active{background-image:none!important;outline:medium none!important;text-shadow:none!important}
-#btn:hover,#btn:focus{background-position:0 -6px;border-color:#999 #999 #888;color:#000}
+.btn,input.btn[type=submit],input.btn[type=button]{border-radius:4px;
+background:-webkit-linear-gradient(white,#DDD);
+background:-o-linear-gradient(white,#DDD);
+background:-moz-linear-gradient(white,#DDD);
+background:linear-gradient(white,#DDD);
+border-color:#DDD #DDD #CCC;border-style:solid;border-width:1px;color:#333;font-size-adjust:none;font-stretch:normal;font-style:normal;font-variant:normal;margin:0;overflow:visible;padding:4px 8px 5px;text-shadow:1px 1px 0 #FFF;width:auto;font:400 11px/14px "tahoma";cursor:pointer}
+.btn:hover,.btn:focus,input.btn[type=submit]:hover,input.btn[type=submit]:focus,input.btn[type=button]:hover,input.btn[type=button]:focus,button.btn:hover,button.btn:focus{border-color:#999 #999 #888;color:#000}
+.btn:active,.btn:active,input.btn[type=submit]:active,input.btn[type=button]:active,button.btn:active{background:#DDD;outline:medium none;text-shadow:none}
/*footer*/
footer ul,footer li{overflow:visible}
/*ranking*/
.rank_list{font-size:12px;margin:0 5px 5px 0}
.rank_list li{border-bottom:1px solid #CCC;margin:0 10px;overflow:visible;padding:10px;position:relative}
+.rank_list li .list_delete_btn{display:none}
+.rank_list li:hover .list_delete_btn{display:inline-block}
.rank_content{display:block;line-height:20px;margin-left:63px;min-height:50px;overflow:hidden;position:relative}
.rank_content span{margin:0;color:#666}
.rank_count{color:#333!important;display:block;font-size:12px;font-weight:700;margin:4px 0;width:400px}
.rank_tag{width:400px}
.rank_name{font-size:14px;font-weight:700}
.rank_name em{font-style:normal;font-weight:400}
-#rank_tag_list{display:block;font-size:12px;padding:5px 10px;width:200px}
-#rank_tag_list li{float:left;margin:4px;white-space:nowrap}
-#tag_area{margin:0 auto;width:300px}
-#tag_area h2{display:block;margin:15px 30px 0}
-#addtag{margin:10px auto;width:250px}
-#addtag span{display:inline-block;vertical-align:middle}
-.tag_text{margin:5px;padding:3px;width:150px}
-#addtag #submit_btn{float:none;margin:10px 40px}
-#tag_msg{background:#FFFCAA none repeat scroll 0 0;border:1px solid #FFED00;clear:both;margin:5px auto;padding:5px 10px;width:485px}
/*user*/
#user_info{clear:both;font-size:12px;padding:5px}
#user_info_profile li{line-height:19px;margin:5px 15px 5px 5px}
#info_head{background-color:#F6F6F6;border:1px solid #EEE;height:70px;margin:9px;padding:0}
#info_name{float:left;font-size:20px;margin:6px 0 2px 10px;text-transform:uppercase}
-#info_relation a{float:left;margin:2px 10px 5px 0;text-decoration:none}
+#info_relation a{float:left;margin:2px 8px 5px 0;text-decoration:none}
#info_headimg{background-color:#EFEFEF;border:1px solid #ADADAD;float:left;height:48px;margin:8px 8px 8px 15px;padding:2px;width:48px}
#info_relation{display:inline-block;font-size:12px;margin:2px 0 0 6px;width:435px}
#following_me{display:inline-block;top:8px;position:relative;margin:10px 0 0 8px;font-size:11px}
.subnavLink:hover,.ac_over:hover{background-color:#E6E6E6;text-decoration:none}
/*actions button*/
-.actions{border-width:0;bottom:8px;line-height:1.25em;position:absolute;right:0;display:none;z-index:9}
-.rt_btn,.replie_btn,.favor_btn,.delete_btn,.msg_replie_btn,.msg_delete_btn,.retw_btn,.trans_btn,.unfav_btn,.unrt_btn{display:inline-block;height:16px;width:21px;margin:-7px 0;overflow:hidden;text-indent:-9999em}
-.ss_delete_btn{display:inline-block;height:16px;width:21px;overflow:hidden;text-indent:-9999em;float:right}
-.replie_btn,.msg_replie_btn{background:url("../img/sprite_icons.png") no-repeat scroll 4px 1px transparent}
-.replie_btn:hover,.msg_replie_btn:hover{background:url("../img/sprite_icons.png") no-repeat scroll -17px 1px transparent}
-.retw_btn,.unrt_btn:hover{background:url("../img/sprite_icons.png") no-repeat scroll 0 -15px transparent}
-.retw_btn:hover,.unrt_btn{background:url("../img/sprite_icons.png") no-repeat scroll -21px -15px transparent}
-.favor_btn,.unfav_btn:hover{background:url("../img/sprite_icons.png") no-repeat scroll 2px -32px transparent}
-.favor_btn:hover,.unfav_btn{background:url("../img/sprite_icons.png") no-repeat scroll -19px -32px transparent}
-.ss_delete_btn,.delete_btn,.msg_delete_btn{background:url("../img/sprite_icons.png") no-repeat scroll 0 -47px transparent}
-.ss_delete_btn:hover,.delete_btn:hover,.msg_delete_btn:hover{background:transparent url(../img/sprite_icons.png) no-repeat scroll -21px -47px}
-.rt_btn{background:url("../img/sprite_icons.png") no-repeat scroll 0 -63px transparent}
-.rt_btn:hover{background:url("../img/sprite_icons.png") no-repeat scroll -21px -63px transparent}
-.trans_btn{background:url("../img/sprite_icons.png") no-repeat scroll -2px -79px transparent}
-.trans_btn:hover{background:url("../img/sprite_icons.png") no-repeat scroll -23px -79px transparent}
-.trans_header{border-top:1px solid #AAA;color:#AAA;display:block;margin-top:5px;padding-top:5px}
-.trans_body{display:block}
-.trans_close{color:#AAA;display:block;float:right;font-size:12px;margin-top:7px;text-decoration:none}
+.actions{border-width:0;bottom:3px;line-height:1.25em;position:absolute;right:0;display:none;z-index:9}
+.ss_delete_btn,.list_delete_btn,.actions a{height:16px;width:21px;color:#ADADAD}
+.list_delete_btn,.actions a{margin:-7px 0}
+.ss_delete_btn:hover,.list_delete_btn:hover,.actions a:hover{text-decoration:none!important;color:#333}
+.actions a.unrt_btn:hover,.actions a.unfav_btn:hover{color:#ADADAD}
+.actions a.unrt_btn,.actions a.unfav_btn{color:#333}
+
/*search*/
#block{font-size:12px;margin:20px}
#search_form{font-size:12px;margin:15px;padding:0 0 10px;text-align:center}
#query{border:1px solid #999;display:block;float:left;font-family:Helvetica,Arial,Sans-serif;font-size:18px;height:24px;margin:0 0 25px 45px;padding:4px 0;text-indent:10px;width:300px;border-radius:5px}
#header_search form {height:26px;width:175px}
#header_search_query{border-color:#999;border-style:solid none solid solid;border-width:1px medium 1px 1px;float:left;font-size:12px;height:14px;line-height:18px;padding:5px 0;text-indent:5px;width:144px}
-#header_search_submit{
-background:url("../img/nav_search_submit.png") repeat scroll -2px 0 transparent!important;border:1px solid #999;color:#555;cursor:pointer;float:left;font-size:14px;height:26px;line-height:26px;text-align:center;width:28px}
+#header_search_submit{border:1px solid #999;color:#555;cursor:pointer;float:left;font-size:14px;height:26px;line-height:26px;text-align:center;width:28px}
#header_search_submit:hover{
-background:transparent url(../img/nav_search_submit.png) repeat scroll -2px -25px!important;outline:none}
-#header_search_submit:focus, #header_search_submit:active{
-background:transparent url(../img/nav_search_submit.png) repeat scroll -2px -50px!important;outline:none}
+background:-webkit-linear-gradient(white,#aaa);
+background:-o-linear-gradient(white,#aaa);
+background:-moz-linear-gradient(white,#aaa);
+background:linear-gradient(white,#aaa);
+}
+#header_search_submit:active{background:#ddd}
+.ac_results .ss_delete_btn{float:right;display:none}
+.ac_odd:hover .ss_delete_btn,.ac_even:hover .ss_delete_btn{display:inline-block}
/* =setting
----------------------------------------*/
#list_protect{width:16px}
#list_submit{margin-left:220px;width:60px}
#list_form{border-radius:8px;background-color:#F5F5F5;border:3px solid #CCC;display:none;margin:0 auto;padding:10px 10px 0;width:390px}
-#list_create_btn{display:block;margin-bottom:10px;text-align:center}
+#mylists_btns{text-align:center;display:block}
+#mylists_btns a{display:inline-block;margin:20px auto 10px}
+#mylists_btns a:hover{text-decoration:none}
#member_form{border-radius:8px;background-color:#F5F5F5;border:4px solid #CCC;font-size:12px;padding:5px;position:absolute}
#member_form span{display:block;font-size:12px;margin:5px;text-align:center}
#list_members{font-size:12px;height:70px;padding:3px;width:266px}
#member_submit,#list_submit,#member_cancel{padding:2px 4px}
-.list_delete_btn{margin-top:5px}
/*fieldsets*/
fieldset.common-form{border:0 none;margin:0}
fieldset.vertical-form input[type=text]{width:165px}
div.direct-message-box fieldset.standard-form{padding:10px 90px;width:548px}
fieldset.common-form td[colspan=2]{text-align:right}
+.ac_results{border:1px solid #666;}
.ac_results ul{width:100%;list-style-position:outside;list-style:none;margin:0;padding:0}
.ac_results li{cursor:default;display:block;font:menu;font-size:12px;line-height:16px;overflow:hidden;margin:0;padding:2px 5px}
-.ac_loading{background:#FFF url(img/ajax.gif) right center no-repeat}
+.suggestion_loading{position:absolute;left:345px;top:46px;font-size:15px;color:#adadad}
+.ac_input:not(.ac_loading)+.suggestion_loading{display:none}
.ac_odd{background-color:#eee}
-
-/*Tipsy*/
-.tipsy{color:#333;cursor:default;font-size:11px;line-height:18px;position:absolute;background:url("../img/tipsy.gif") no-repeat;opacity:0.8;padding:5px;display:none}
-.tipsy-inner{border-radius:4px;box-shadow:0 1px 2px rgba(0,0,0,.5);-webkit-box-shadow:0 1px 2px rgba(0,0,0,.5);background-color:#000;color:#DDD;max-width:200px;padding:8px;text-align:left}
-.tipsy-inner span{border-radius:3px;background-color:#333;font-size:12px;padding:2px 4px}
-.tipsy-inner strong{font-size:12px}
-.tipsy-north{background-position:center top}
-.tipsy-south{background-position:center bottom}
-.tipsy-east{background-position:right center}
-.tipsy-west{background-position:left center}
+.ac_even{background-color:#fff}
/*Avatar Menu*/
.right_menu .menu button.clicked{background-image:none}
.right_menu li a:hover{text-decoration:none!important}
.right_menu li:hover{background-color:#666;color:#FFF}
.right_menu li:hover *{color:#FFF}
-.right_menu li.divider{border:none/*border-top:1px solid #DDD*/}
-.right_menu i{background:url("../img/sprite-icons.png") no-repeat;display:inline-block;height:13px;outline:medium none;overflow:hidden;width:13px}
-.right_menu a i{left:7px;position:absolute;top:4px;width:15px}
-.right_menu .rm_mention i, .right_menu .ul_mention i{background-position:-16px -32px}
-.right_menu .rm_mention:hover i, .right_menu .ul_mention:hover i{background-position:0 -32px}
-.right_menu .rm_dm i,.right_menu .ul_dm i{background-position:-48px -32px}
-.right_menu .rm_dm:hover i,.right_menu .ul_dm:hover i{background-position:-32px -32px}
-.right_menu .rm_follow i,.right_menu .ul_follow i{background-position:-176px -32px}
-.right_menu .rm_follow:hover i,.right_menu .ul_follow:hover i{background-position:-160px -32px}
-.right_menu .rm_remove i,.right_menu .ul_remove i{background-position:-208px -32px}
-.right_menu .rm_remove:hover i,.right_menu .ul_remove:hover i{background-position:-192px -32px}
-.right_menu .rm_unfollow i,.right_menu .ul_unfollow i{background-position:-112px -32px}
-.right_menu .rm_unfollow:hover i,.right_menu .ul_unfollow:hover i{background-position:-96px -32px}
-.right_menu .rm_block i,.right_menu .ul_block i,.right_menu .rm_unblock:hover i, .right_menu .ul_unblock:hover i{background-position:-144px -32px}
-.right_menu .rm_block:hover i,.right_menu .ul_block:hover i,.right_menu .rm_unblock i, .right_menu .ul_unblock i{background-position:-128px -32px}
-.right_menu .rm_spam i,.right_menu .ul_spam i{background-position:-272px -32px}
-.right_menu .rm_spam:hover i, .right_menu .ul_spam:hover i{background-position:-256px -32px}
+.right_menu i{left:7px;position:absolute;top:4px;width:15px;height:13px;text-align:center;font-size:13px}
+.right_menu a:hover > i{opacity:0.8}
+.fa-customize-mention::before{content:"@"}
/*Twitter Buttons*/
-.btn-m,input[type=submit].btn-m,input[type=button].btn-m{background-position:0 -200px;font-size:15px;line-height:20px;padding:5px 15px 6px;border-radius:5px}.btn-l,input[type=submit].btn-l,input[type=button].btn-l{background-position:0 -400px;font-size:20px;line-height:26px;padding:7px 20px 9px;border-radius:6px}.btn-light{background-color:#add!important;background-image:url("https://s3.amazonaws.com/twitter_production/a/1261078355/images/buttons/bg-btn-light.gif")!important;border-color:#add #add #9cc!important;text-shadow:1px 1px 0 #dff!important}.btn-dark{background-color:#59a!important;background-image:url("https://s3.amazonaws.com/twitter_production/a/1261078355/images/buttons/bg-btn-dark.gif")!important;border-color:#59a #59a #489!important;color:#fff!important;text-shadow:-1px -1px 0 #59a!important}.btn-blue{background-color:#39d!important;background-image:url("https://s3.amazonaws.com/twitter_production/a/1261078355/images/buttons/bg-btn-blue.gif")!important;border-color:#39d #39d #28c!important;color:#fff!important;text-shadow:-1px -1px 0 #39d!important}.btn-chart{background-color:#9c2!important;background-image:url("https://s3.amazonaws.com/twitter_production/a/1261078355/images/buttons/bg-btn-chart.gif")!important;border-color:#9c2 #9c2 #8b1!important;text-shadow:1px 1px 0 #df6!important}.btn-mint{background-color:#a22!important;background-image:url("https://s3.amazonaws.com/twitter_production/a/1261078355/images/buttons/bg-btn-mint.gif")!important;border-color:#bdb #bdb #aca!important;text-shadow:1px 1px 0 #efe!important}.btn-green{background-color:#272!important;background-image:url("../img/bg-btn-green.gif")!important;border-color:#272 #272 #161!important;color:#fff!important;text-shadow:-1px -1px 0 #272!important}.btn-pink{background-color:#daa!important;background-image:url("https://s3.amazonaws.com/twitter_production/a/1261078355/images/buttons/bg-btn-pink.gif")!important;border-color:#daa #daa #c99!important;text-shadow:1px 1px 0 #fdd!important}.btn-red{background-color:#a22!important;background-image:url("../img/bg-btn-red.gif")!important;background-position:0 0;border-color:#a22 #a22 #911!important;text-shadow:-1px -1px 0 #a22!important;color:#fff!important}.btn:hover,.btn:focus,input[type=submit].btn:hover,input[type=submit].btn:focus,button.btn:hover,button.btn:focus{border-color:#999 #999 #888;background-position:0 -6px;color:#000}.btn-light:hover,.btn-light:focus{border-color:#7aa #7aa #699}.btn-dark:hover,.btn-dark:focus{border-color:#267 #267 #156;color:#fff}.btn-blue:hover,.btn-blue:focus{border-color:#17b #17b #06a;color:#fff}.btn-chart:hover,.btn-chart:focus{border-color:#7a1 #7a1 #690}.btn-mint:hover,.btn-mint:focus,input[type=submit].btn-mint:hover,input[type=submit].btn-mint:focus,button.btn-mint:hover,button.btn-mint:focus{border-color:#8a8 #8a8 #797!important}.btn-green:hover,.btn-green:focus,input[type=submit].btn-green:hover,input[type=submit].btn-green:focus,button.btn-green:hover,button.btn-green:focus{background-color:#272!important;border-color:#050 #050 #040!important;color:#fff}.btn-pink:hover,.btn-pink:focus,input[type=submit].btn-pink:hover,input[type=submit].btn-pink:focus,button.btn-pink:hover,button.btn-pink:focus{border-color:#a88 #a88 #977!important}.btn-red:hover,.btn-red:focus,input[type=submit].btn-red:hover,input[type=submit].btn-red:focus,button.btn-red:hover,button.btn-red:focus{background-color:#a22!important;border-color:#611 #611 #500!important;color:#fff}.btn-m:hover,.btn-m:focus,input[type=submit].btn-m:hover,input[type=submit].btn-m:focus,button.btn-m:hover,button.btn-m:focus{background-position:0 -206px}.btn-l:hover,.btn-l:focus,input[type=submit].btn-l:hover,input[type=submit].btn-l:focus,button.btn-l:hover,button.btn-l:focus{background-position:0 -406px}.dbtn,.dbtn:hover,.dbtn:focus,.dbtn:active,button.dbtn:hover,button.dbtn:focus{background:#eee;border-color:#ddd;color:#aaa;text-shadow:none}.btn-light.dbtn,.btn-light.dbtn:hover,.btn-light.dbtn:focus,.btn-light.dbtn:active{background:#dee;border-color:#cdd;color:#9aa}.btn-dark.dbtn,.btn-dark.dbtn:hover,.btn-dark.dbtn:focus,.btn-dark.dbtn:active{background:#aad5dd;border-color:#99c5cc;color:#ddf6f6}.btn-blue.dbtn,.btn-blue.dbtn:hover,.btn-blue.dbtn:focus,.btn-blue.dbtn:active{background:#bde;border-color:#acd;color:#def}.btn-chart.dbtn,.btn-chart.dbtn:hover,.btn-chart.dbtn:focus,.btn-chart.dbtn:active{background:#deb;border-color:#cda;color:#ab9}.btn-mint.dbtn,.btn-mint.dbtn:hover,.btn-mint.dbtn:focus,.btn-mint.dbtn:active{background:#ded;border-color:#cdc;color:#9a9}.btn-green.dbtn,.btn-green.dbtn:hover,.btn-green.dbtn:focus,.btn-green.dbtn:active{background:#aca;border-color:#9b9;color:#ded}.btn-pink.dbtn,.btn-pink.dbtn:hover,.btn-pink.dbtn:focus,.btn-pink.dbtn:active{background:#edd;border-color:#dcc;color:#a99}.btn-red.dbtn,.btn-red.dbtn:hover,.btn-red.dbtn:focus,.btn-red.dbtn:active{background:#caa;border-color:#b99;color:#edd}
+.btn.btn-green{border-color:#272 #272 #161;color:#fff;text-shadow:-1px -1px 0 #272;
+background:-webkit-linear-gradient(#6b6,#161);
+background:-o-linear-gradient(#6b6,#161);
+background:-moz-linear-gradient(#6b6,#161);
+background:linear-gradient(#6b6,#161);
+}
+.btn.btn-red{border-color:#a22 #a22 #911;text-shadow:-1px -1px 0 #a22;color:#fff;
+background:-webkit-linear-gradient(#f66,#911);
+background:-o-linear-gradient(#f66,#911);
+background:-moz-linear-gradient(#f66,#911);
+background:linear-gradient(#f66,#911);
+}
+span.is-following{color:green;background-color:#DDD;border-style:solid;border-radius:3px;border-width:0 0 1px;border-color:white;font-size:smaller;padding:2px}
+.btn.btn-green:active,input[type=submit].btn-green:active,button.btn-green:active{background:#272}
+.btn.btn-red:active,input[type=submit].btn-red:active,button.btn-red:active{background:#a22}
+a.btn.btn-white,input.btn.btn-white{font-size:14px;font-family:tahoma;font-weight:700;padding:9px 11px}
+#media_preview img{width:50px;height:50px;margin:0 2px;border:1px solid #adadad}
+#media_preview span{font-size:45px;left:10px;top:-35px;position:absolute;opacity:0.8;color:#adadad;display:none}
+#media_preview > li{display:inline}
+#media_preview > li > a{cursor:pointer;position:relative}
+#media_preview > li > a:hover > span{display:block}
<div id="login_area">
<div id="error">
<?php
- if ( isset($_GET['t'])){
- switch($_GET['t']){
+ if (isset($_GET['t'])) {
+ switch($_GET['t']) {
case 1:
echo '<p>Fail to connect Twitter right now. Please <a href="index.php">go back</a> or <a href="logout.php">sign in</a> minutes later.</p>';
break;
default:
echo '<p>Ooops, an unknown error occured. Please <a href="index.php">go back</a> or <a href="logout.php">sign in</a> again.</p>';
}
- } else{
+ } else if (isset($_GET['code'])) {
+ echo '<p>Ooops, an error <a href="https://dev.twitter.com/docs/error-codes-responses">'.$code.'</a> occured. Please <a href="index.php">go back</a> or <a href="logout.php">sign in</a> again.</p>';
+ } else {
echo '<p>Ooops, an unknown error occured. Please <a href="index.php">go back</a> or <a href="logout.php">sign in</a> again.</p>';
}
?>
$statuses = $t->getFavorites($user_id, $since_id, $max_id);
if ($statuses === false) {
- header('location: error.php');exit();
+ header('location: error.php?code='.$t->http_code);exit();
}
$empty = count($statuses) == 0 ? true : false;
if ($empty) {
$output .= "</ol><div id=\"pagination\">";
- $output .= "<a id=\"less\" class=\"round more\" style=\"float: left;\" href=\"favor.php?since_id={$firstid}\">Back</a>";
- $output .= "<a id=\"more\" class=\"round more\" style=\"float: right;\" href=\"favor.php?max_id={$lastid}\">Next</a>";
+ $output .= "<a id=\"less\" class=\"btn btn-white\" style=\"float: left;\" href=\"favor.php?since_id={$firstid}\">Back</a>";
+ $output .= "<a id=\"more\" class=\"btn btn-white\" style=\"float: right;\" href=\"favor.php?max_id={$lastid}\">Next</a>";
$output .= "</div>";
<div class="clear"></div>
<footer class="round">
<ul>
- <li>© 2010-2013 Contributors incl. <a href="profile.php" title="It is you that make it!" target="_blank"><?php echo getEncryptCookie('twitese_name')?></a></li>
+ <li>© 2010-<?php echo date("Y") ?> Contributors incl. <a href="profile.php" title="It is you that make it!" target="_blank"><?php echo getCookie('name')?></a></li>
<?php if (BLOG_SITE) { ?><li><a href="<?php echo BLOG_SITE ?>" title="Site Owner's Blog" target="_blank">Blog</a></li><?php }?>
<li><a href="http://code.google.com/p/tuite/" target="_blank" title="Embr is proundly powered by the Open Source project - Twitese & Rabr">Twitese</a></li>
<li><a href="https://github.com/AstroProfundis/embrr" target="_blank">Open Source</a></li>
<script>var nav=document.getElementById("primary_nav");var links=nav.getElementsByTagName("a");var currenturl=document.location.href;for(var i=0;i<links.length;i++){var linkurl=links[i].getAttribute("href");if(currenturl==links[i]){links[i].className="active";}}</script>
</body>
</html>
-<?php ob_end_flush(); ?>
\ No newline at end of file
+<?php ob_end_flush(); ?>
<meta name="author" content="Contributors" />
<link rel="icon" href="img/favicon.ico" />
<link id="css" href="css/main.css" rel="stylesheet" />
+<link href="//cdn.jsdelivr.net/fontawesome/4.1.0/css/font-awesome.min.css" rel="stylesheet" />
<title>Embr / <?php echo $title ?></title>
<?php
$myCSS = getDefCookie("myCSS");
- $theme = getDefCookie("theme");
$old_css = "ul.sidebar-menu li.active a";
$new_css = "ul.sidebar-menu a.active";
$myCSS = str_replace($old_css,$new_css,$myCSS);
}
?>
<style type="text/css">
-<?php echo $theme;echo $myCSS ?>
+<?php echo $myCSS ?>
a:active,a:focus {outline:none}
body {font-size:<?php echo $fontsize ?> !important;<?php
if ($Bgcolor != "") echo 'background-color:'.$Bgcolor.';';
if ($Bgimage != "") echo 'background-image: url("'.$Bgimage.'");';
?>background-repeat:<?php echo $Bgrepeat ?>}
</style>
-<script src="https://ajax.aspnetcdn.com/ajax/jquery/jquery-1.8.3.min.js"></script>
-<script src="js/jquery.js"></script>
+<script src="https://ajax.aspnetcdn.com/ajax/jquery/jquery-2.1.1.min.js"></script>
+<script src="js/jquery.embrr.utils.js"></script>
<script src="js/mediaPreview.js"></script>
<script src="js/public.js"></script>
</head>
<div id="shortcutTip" style="display:none"></div>
<header>
<div class="wrapper">
- <div id="sentTip" style="display:none"></div>
+ <div id="sentTip"></div>
<a href="index.php"><img id="logo" style="float:left" width="155" height="49" src="img/logo.png" /></a>
<nav class="round">
<ul>
<?php $scheme=(!isset($_SERVER['HTTPS']) || $_SERVER['HTTPS'] != "on") ? 'http://' : 'https://';
$base_url=str_replace('http://',$scheme,BASE_URL);
- ?>
- <li><a class="share" title="Drag me to share!" href="javascript:var%20d=document,w=window,f='<?php echo $base_url."/share.php" ?>',l=d.location,e=encodeURIComponent,p='?u='+e(l.href)+'&t='+e(d.title)+'&d='+e(w.getSelection?w.getSelection().toString():d.getSelection?d.getSelection():d.selection.createRange().text)+'&s=bm';a=function(){if(!w.open(f+p,'sharer','toolbar=0,status=0,resizable=0,width=600,height=300,left=175,top=150'))l.href=f+'.new'+p};if(/Firefox/.test(navigator.userAgent))setTimeout(a,0);else{a()}void(0);">Share</a></li>
+ ?>
<li><a href="index.php">Home</a></li>
<li><a href="profile.php">Profile</a></li>
<li><a href="setting.php">Settings</a></li>
<table cellspacing="0" class="columns">
<tbody>
<tr>
- <td id="left" class="column round-left">
\ No newline at end of file
+ <td id="left" class="column round-left">
if ($title != 'Direct Messages') {
echo "<h2>What's happening?</h2>" ;
} ?>
-<span id="tip"><b>140</b></span>
+<span id="tip"><span class="fa fa-spinner fa-spin" style="display:none"></span><b>140</b></span>
<?php } ?>
-<form enctype="multipart/form-data" action="ajax/uploadImage.php?do=image" method="post" id="photoArea">
+<form id="photoArea">
<span style="font-weight: bold;">Upload Image</span>
-<p>Powered by Img.ly</p>
<input type="file" name="image" id="imageFile"/>
-<input type="submit" id="imageUploadSubmit" class="btn" value="Upload"/>
-<a href="#" onclick="$('#photoArea').slideToggle(300)" title="Close" class="close"></a>
+<input type="button" id="imageUploadSubmit" class="btn" value="Upload"/>
+<ul id="media_preview"></ul>
+<a href="#" onclick="$('#photoArea').slideToggle(300);return false;" title="Close" class="close fa fa-times"></a>
</form>
<form id="filterArea">
<input type="submit" style="vertical-align: top; padding: 5px; margin: 9px 3px 0pt 6px;" id="filterSubmit" class="btn" value="Update">
<input type="submit" style="padding: 5px; vertical-align: top; margin-top: 9px;" id="filterReset" class="btn" value="Reset">
<input type="submit" style="padding: 5px; vertical-align: top; margin: 9px 0pt 0pt 3px;" id="filterHide" class="btn" value="Hide @">
-<a class="close" title="Close" onclick="$('#filterArea').slideToggle(300)" href="#"></a>
+<a class="close fa fa-times" title="Close" onclick="$('#filterArea').slideToggle(300);return false;" href="#"></a>
</form>
<form id="symArea">
<div id="symbols">
<?php include ('inc/symbols.inc');?>
</div>
-<a class="close" title="Close" onclick="$('#symArea').slideToggle(300)" href="#"></a>
+<a class="close fa fa-times" title="Close" onclick="$('#symArea').slideToggle(300);return false;" href="#"></a>
</form>
-<form id="transArea">
-<span style="font-weight: bold; display: block; margin-bottom: 5px;">Translation Settings</span>
-<p>Translate tweets into
-<select name="langs" style="border: 1px solid rgb(170, 170, 170); padding: 1px 2px;">
-<option value="ar">Arabic</option>
-<option value="zh-CN">简体中文</option>
-<option value="zh-TW">繁體中文</option>
-<option value="da">Danish</option>
-<option value="nl">Dutch</option>
-<option value="en">English</option>
-<option value="fi">Finnish</option>
-<option value="fr">French</option>
-<option value="de">German</option>
-<option value="el">Greek</option>
-<option value="hu">Hungarian</option>
-<option value="is">Icelandic</option>
-<option value="it">Italian</option>
-<option value="ja">Japanese</option>
-<option value="ko">Korean</option>
-<option value="lt">Lithuanian</option>
-<option value="no">Norwegian</option>
-<option value="pl">Polish</option>
-<option value="pt">Portuguese</option>
-<option value="ru">Russian</option>
-<option value="es">Spanish</option>
-<option value="sv">Swedish</option>
-<option value="th">Thai</option>
-</select>
-</p>
-<p>Translate my tweets into <select name="myLangs" style="border: 1px solid rgb(170, 170, 170); margin-top: 5px; padding: 1px 2px;">
-<option value="ar">Arabic</option>
-<option value="zh-CN">简体中文</option>
-<option value="zh-TW">繁體中文</option>
-<option value="da">Danish</option>
-<option value="nl">Dutch</option>
-<option value="en">English</option>
-<option value="fi">Finnish</option>
-<option value="fr">French</option>
-<option value="de">German</option>
-<option value="el">Greek</option>
-<option value="hu">Hungarian</option>
-<option value="is">Icelandic</option>
-<option value="it">Italian</option>
-<option value="ja">Japanese</option>
-<option value="ko">Korean</option>
-<option value="lt">Lithuanian</option>
-<option value="no">Norwegian</option>
-<option value="pl">Polish</option>
-<option value="pt">Portuguese</option>
-<option value="ru">Russian</option>
-<option value="es">Spanish</option>
-<option value="sv">Swedish</option>
-<option value="th">Thai</option>
-</select>
-<input type="button" value="Translate" class="btn" id="translateMy" style="vertical-align: middle; padding: 3px 8px; margin-top: -3px;">
-</p>
-<a class="close" title="Close" onclick="$('#transArea').slideToggle(300)" href="#"></a>
-</form>
-
-<form action="index.php" method="post">
-<a id="transRecover">Restore</a>
+<form>
<textarea name="status" id="textbox"><?php if (isset($_sentText)) echo $_sentText ?></textarea>
<input type="hidden" id="in_reply_to" name="in_reply_to" value="<?php echo isset($_sentInReplyTo) ? $_sentInReplyTo : 0 ?>" />
<?php
$t = getTwitter();
$user = $t->veverify();
if ($user === false) {
- header('location: error.php');exit();
+ header('location: error.php?code='.$t->http_code);exit();
}
$empty = count($user) == 0 || !isset($user->status) || $user->status->text == '';
if ($empty) {
}
?>
<div id="tweeting_controls">
- <a class="a-btn a-btn-m btn-disabled" id="tweeting_button" tabindex="2" href="#" title="Ctrl/⌘+Enter also works!"><span>
- <?php if($title == 'Direct Messages') {
- echo 'Send';
- } else {
- echo 'Tweet';
- } ?>
- </span></a>
- </div>
-
- <div id="func_set">
-
- <a class="func_btn" href="javascript:shortUrlDisplay();" title="Shorten URL" style="background-position:-238px -113px">Shorten URL</a>
-
- <a class="func_btn" href="javascript:shortenTweet();" title="Shorten Tweet" style="background-position:-222px -48px;">Shorten Tweet</a>
+ <a class="a-btn btn-disabled" id="tweeting_button" tabindex="2" href="#" title="Ctrl/⌘+Enter also works!"><span class="fa fa-send-o"></span></a>
+</div>
- <a id="transBtn" title="Translation Settings" class="func_btn" style="background-position:-110px -80px;">Translate</a>
+ <div id="func_set" style="left:<?php echo ($title == 'Updates' || $title == 'Home') ? '271' : '298'; ?>px">
- <a title="Upload Image" id="photoBtn" class="func_btn" style="background-position: -207px -128px;">Image</a>
+ <a class="func_btn fa fa-link" href="javascript:shortUrlDisplay();" title="Shorten URL"></a>
- <a id="filterBtn" title="Filter Timeline" class="func_btn" style="background-position:-174px -112px;">Filter</a>
+ <a class="func_btn fa fa-image" title="Upload Image" id="photoBtn"></a>
- <a title="Sogou Cloud IME" href="javascript:void((function(){var%20n=navigator.userAgent.toLowerCase();ie=n.indexOf('msie')!=-1?1:0;if(document.documentMode)ie=0;charset='';if(ie)charset=document.charset;src=ie&&charset=='utf-8'?'http://web.pinyin.sogou.com/web_ime/init2_utf8.php':'http://web.pinyin.sogou.com/web_ime/init2.php';element=document.createElement('script');element.setAttribute('src',src);document.body.appendChild(element);})())" onclick="updateSentTip('Loading...', 5000, 'ing')" class="func_btn" style="background-position: -62px -112px;">Sogou</a>
+ <a class="func_btn fa fa-filter" id="filterBtn" title="Filter Timeline"></a>
- <a id="symbolBtn" title="Symbols and smileys" class="func_btn" style="background-position: -206px -113px;">Symbols</a>
+ <a class="func_btn fa fa-heart" id="symbolBtn" title="Symbols and smileys"></a>
- <a id="restoreBtn" style="background-position: 2px -64px;" class="func_btn" title="Restore previous tweet">Restore</a>
+ <a class="func_btn fa fa-reply" id="restoreBtn" title="Restore previous tweet"></a>
- <a id="autoBtn" title="Auto refresh control" class="func_btn pause">Pause</a>
+ <?php if($title == 'Updates' || $title == 'Home') { ?>
+ <a class="func_btn fa fa-pause" id="autoBtn" title="Auto refresh control"></a>
+ <?php } ?>
- <a id="clearBtn" style="background-position: 3px -176px;" class="func_btn" title="Sweep Timeline" class="func_btn">Sweep</a>
+ <a class="func_btn fa fa-power-off" id="clearBtn" title="Sweep Timeline"></a>
- <a id="refreshBtn" title="Refresh the timeline" class="func_btn" style="background-position: -62px -80px;">Refresh</a>
+ <a class="func_btn fa fa-refresh" id="refreshBtn" title="Refresh the timeline"></a>
</div>
</form>
- <div class="clear"></div>
\ No newline at end of file
+ <div class="clear"></div>
<div id="side" class="round-right">
<div id="sideinfo">
<a href="profile.php"><img id="sideimg" src="<?php echo getCookie("imgurl")?>" /></a>
- <span id="sideid"><span id="side_name"><?php echo getEncryptCookie('twitese_name')?></span><a href="#" id="profileRefresh" title="refresh your profile"><i></i></a></span>
+ <span id="sideid"><span id="side_name"><?php echo getCookie('name')?></span><a href="#" id="profileRefresh" title="refresh your profile" class="fa fa-repeat"></a></span>
<a href="profile.php"><span id="me_tweets"><span id="update_count"><?php echo getCookie('statuses_count')?></span> tweets</span></a>
</div>
<?php if (strrpos($_SERVER['PHP_SELF'], 'profile')) {
$preset = array(
array(
'term' => 'Short·cuts',
- 'def' => '<em>n.</em> Use shortcuts in Embr.',
+ 'def' => '<em>n.</em> Use shortcuts in Embrr.',
'more' => '<strong>Shortcuts available now:</strong><br>
C / U - Update<br>
T - Go to top<br>
array(
'term' => 'User Di·rect View',
'def' => '<em>n.</em> Now you can view the user page of your interested more incentively.',
- 'more' => 'take @'.SITE_OWNER.' for example, you can visit his/her page via '.BASE_URL.'/'.SITE_OWNER,
+ 'more' => 'Take @'.SITE_OWNER.' for example, you can visit his/her page via '.BASE_URL.'/'.SITE_OWNER,
),
array(
'term' => 'Realtime Refresh',
'def' => '<em>v.</em> Now you can refresh your profile whenever you like!',
'more' => 'See the circle behind your username? Try to click it!'
),
- array(
- 'term' => 'Custom·Tips',
- 'def' => '<em>n.</em> Hate embr tips so much? Now you can edit me into your own tips!',
- 'more' => 'Your tips will be encrypted in your cookies all for your privacy!'
- ),
);
if(isset($_COOKIE['Tip_Title']) || isset($_COOKIE['Tip_Content']) || isset($_COOKIE['Tip_More'])){
$raw = array(
);
initSidebarTip($raw);
} else {
- initSidebarTip($preset[3]);
+ srand((double)microtime()*1000000);
+ initSidebarTip($preset[rand(0,2)]);
}
?>
</p>
<div class="clear"></div>
<ul id="primary_nav" class="sidebar-menu">
<li id="updates_tab"><a class="in-page-link" href="all.php"><span>Updates</span></a></li>
- <li id="replies_tab"><a class="in-page-link" href="replies.php"><span>@<?php echo is_null(getEncryptCookie('twitese_name')) ? $t->screen_name : getEncryptCookie('twitese_name'); ?></span></a></li>
+ <li id="replies_tab"><a class="in-page-link" href="replies.php"><span>@<?php echo is_null(getCookie('name')) ? $t->screen_name : getCookie('name'); ?></span></a></li>
<li id="msgs_tab"><a class="in-page-link" href="message.php"><span>Direct Messages</span></a></li>
<li id="lists_tab"><a class="in-page-link" href="lists.php"><span>Lists</span></a></li>
<li id="favs_tab"><a class="in-page-link" href="favor.php"><span>Favorites</span></a></li>
</table>
<?php
function initSidebarTip($entity){
- echo '<a class="definition"><strong contenteditable="true">'.$entity['term'].'</strong><span contenteditable="true">'.$entity['def'].'</span></a><br><br><span>Click for more details.<span id="indicator">[+]</span></span><span id="sidebarTip_more"><span contenteditable="true">'.$entity['more'].'</span><br><br><a href="#" id="tip_reset" title="You will lose all customized Tips!">Reset to default</a></span>';
+ echo '<a class="definition"><strong contenteditable="true" class="sidebarTipText">'.$entity['term'].'</strong><span contenteditable="true" class="sidebarTipText">'.$entity['def'].'</span></a><br><br><span>Click for more details.<span id="indicator">[+]</span></span><span id="sidebarTip_more"><span contenteditable="true" class="sidebarTipText"><br>'.$entity['more'].'</span><br><br><a href="#" id="tip_reset" title="You will lose all customized Tips!">Reset to default</a></span>';
}
-?>
\ No newline at end of file
+?>
<li id="header_search">
<form method="get" action="search.php">
<input type="text" name="q" autocomplete="off" id="header_search_query" class="round-left"/>
- <input type="submit" value="" id="header_search_submit" class="round-right"/>
+ <button type="submit" id="header_search_submit" class="round-right fa fa-search"></button>
</form>
</li>
</ul>
<hr />
-<div id="trends">
-<h2 id="trends_title">
+<div id="trends" class="side_expandable">
+<h2 id="trends_title" class="closed">
<span>Trending Topics</span>
+<span class="fa fa-chevron-circle-down"></span>
+<span class="fa fa-chevron-circle-up"></span>
+<span class="fa fa-spinner fa-spin"></span>
</h2>
<ul id="trend_entries" class="sidebar-menu">
</ul>
</div>
<hr />
-<div id="following">
-<h2 id="following_title">
+<div id="following" class="side_expandable">
+<h2 id="following_title" class="closed">
<span>Following</span>
+<span class="fa fa-chevron-circle-down"></span>
+<span class="fa fa-chevron-circle-up"></span>
+<span class="fa fa-spinner fa-spin"></span>
</h2>
<div id="following_list">
</div>
</div>
<hr />
-<div id="apiquota">
-<h2 id="apiquota_title">
+<div id="apiquota" class="side_expandable">
+<h2 id="apiquota_title" class="closed">
<span>API Quota</span>
+<span class="fa fa-chevron-circle-down"></span>
+<span class="fa fa-chevron-circle-up"></span>
+<span class="fa fa-spinner fa-spin"></span>
</h2>
<ul id="apiquota_list" class="sidebar-menu">
</ul>
<div id="version">
<h2 id="version_title"><span>Version: 0.6.2 (f-99)</span></h2>
</div>
-<!--Preload Start-->
-<div class="preload" style="position: absolute; left: -9999em; top: -9999em;">
-<img src="img/spinner.gif" width="14" height="14"/>
-<img src="img/toggle_up_dark.png" width="13" height="13"/>
-<img src="img/sprite-icons.png" width="288" height="96"/>
-<img src="img/square.gif" width="16" height="11"/>
-</div>
-<!--Preload End-->
</td>
</tr>
</table>
-</td>
<span title="“不明真相的围观群众”">槑槑槑槑呆槑槑槑槑槑槑槑槑……</span>
<span title="『家』">~o(▽` o) =3 =3 =3</span>
<span title="【TEL】"><铃铃铃~ヾ( ̄  ̄*)==3=3=3</span>
-<span title="【小黑屋】">ヽ( ̄︿ ̄ )—C<(/;◇;)/ </span>
+<span title="【小黑屋】">ヽ( ̄︿ ̄ )—C<(/;◇;)/ </span>
<span title="555~他不起来……">ヾ( ┬o┬)┌θθθθ(;;_ _).o○</span>
-<span title="aaa">o((>ω< ))o</span>
+<span title="aaa">o((>ω< ))o</span>
<span title="aaa">o(≧口≦)o</span>
-<span title="ai">╮( ̄▽ ̄")╭ </span>
+<span title="ai">╮( ̄▽ ̄")╭ </span>
<span title="bai">m(_ _)m</span>
<span title="bai">ヾ( ̄▽ ̄)Bye~Bye~</span>
-<span title="baotou">▄︻┻┳═一…… ☆(>○<)</span>
+<span title="baotou">▄︻┻┳═一…… ☆(>○<)</span>
<span title="baoxiao">o(*≧▽≦)ツ</span>
<span title="baoxiao">ヾ(≧▽≦*)o</span>
<span title="bengkui">o(≧口≦)o</span>
<span title="canle">X﹏X 惨了!</span>
<span title="chaoxiao">q(≧▽≦q)</span>
<span title="chouyan">( ̄ c ̄)y▂ξ。。。</span>
-<span title="chuai"><(  ̄^ ̄)(θ(θ☆( >_< </span>
+<span title="chuai"><(  ̄^ ̄)(θ(θ☆( >_< </span>
<span title="dai">( ̄△ ̄;)</span>
<span title="dai">( ̄旦 ̄;)</span>
<span title="dai">━┳━ ━┳━</span>
<span title="dao">Σ(`д′*ノ)ノ</span>
<span title="dao">Σ(っ °Д °;)っ</span>
<span title="dese">~( ̄▽ ̄~)(~ ̄▽ ̄)~</span>
-<span title="deyi"><( ̄ˇ ̄)/</span>
+<span title="deyi"><( ̄ˇ ̄)/</span>
<span title="duo">┬┴┤_·)</span>
-<span title="e">("▔□▔)</span>
+<span title="e">("▔□▔)</span>
<span title="e">(⊙﹏⊙)</span>
<span title="e">-________-''</span>
<span title="e">o(` · ~ · ′。)o</span>
<span title="EXIT">λ…λλ…λ…λλλ…</span>
<span title="fangp">○| ̄|_ =3</span>
<span title="fanzhuo">(╯′□`)╯ ┫:·'∵:.┻┻:·'.:┣∵·:. ┳┳☆</span>
-<span title="fanzhuo">(╯‵□′)╯""┻━┻☆))>○<)</span>
+<span title="fanzhuo">(╯‵□′)╯""┻━┻☆))>○<)</span>
<span title="fanzhuo">┻━┻︵╰(‵□′)╯︵┻━┻ </span>
<span title="fei">︿( ̄︶ ̄)︿</span>
<span title="fen">ヾ(≧奋≦)〃</span>
<span title="fufu">( ̄ˇ ̄)v</span>
<span title="fufu">fufu~ ^u^</span>
<span title="gaozhuang">( σ'ω')σ </span>
-<span title="gaozhuang">o(>O<;; )σ</span>
+<span title="gaozhuang">o(>O<;; )σ</span>
<span title="gfw">┳G┻┳F┳┻W┫</span>
<span title="GiveMeFive!">(┘ ̄︶ ̄)┘└( ̄︶ ̄└)</span>
-<span title="GO!"><( ̄︶ ̄)↗</span>
-<span title="GO!"><( ̄OO, ̄)/</span>
+<span title="GO!"><( ̄︶ ̄)↗</span>
+<span title="GO!"><( ̄OO, ̄)/</span>
<span title="good">Good! o( ̄▽ ̄)d</span>
<span title="gudan">______λ......_____</span>
<span title="guilian">( ̄┰ ̄*)</span>
<span title="ha">(#°Д°) </span>
<span title="ha">O口O!</span>
-<span title="ha">Σ(⊙▽⊙"a...</span>
+<span title="ha">Σ(⊙▽⊙"a...</span>
<span title="haha">o(*≧▽≦)ツ</span>
<span title="han">( ̄_ ̄|||)</span>
-<span title="han">( ̄▽ ̄")</span>
+<span title="han">( ̄▽ ̄")</span>
<span title="han">(寒 ̄ii ̄)彡…彡…彡</span>
<span title="hehe">o(* ̄▽ ̄*)o</span>
<span title="heiban">【】\(·ω·`)o</span>
<span title="heng">(;′⌒`)</span>
<span title="heng">(ε- )</span>
<span title="heng">o( ̄ヘ ̄o#) </span>
-<span title="hh">( ̄▽ ̄")</span>
+<span title="hh">( ̄▽ ̄")</span>
<span title="hh">o(* ̄▽ ̄*)o</span>
<span title="hhh">^-^</span>
<span title="hhh">^O^</span>
<span title="kedou">(°°)~ (°°)~ (°°)~ (°°)~</span>
<span title="Kiss!"> (* ̄( ̄ *)</span>
<span title="koushui">ˋ( ° ▽、° ) 口水ing...</span>
-<span title="K歌"> ...φ(0 ̄*)啦啦啦_φ(* ̄0 ̄)></span>
+<span title="K歌"> ...φ(0 ̄*)啦啦啦_φ(* ̄0 ̄)></span>
<span title="laohu">m( =∩王∩= )m</span>
<span title="lei">(┳_┳)...</span>
<span title="lei">/(ㄒoㄒ)/~~</span>
-<span title="luanma">卐~%?…,# *'☆&℃$︿★?</span>
+<span title="luanma">卐~%?…,# *'☆&℃$︿★?</span>
<span title="manzu">o(* ̄︶ ̄*)o</span>
<span title="manzu">o( ̄ˇ ̄)o</span>
<span title="mao">o( =·ω·= )m </span>
<span title="mmm">mmm.....</span>
<span title="mojiezuo">Capricorn</span>
<span title="mua">mua! (*╯3╰)</span>
-<span title="niao">--\(˙<>˙)/--</span>
+<span title="niao">--\(˙<>˙)/--</span>
<span title="nie">~( ̄▽ ̄)~* </span>
<span title="nu">(#‵′) </span>
<span title="nu">(o#゜ 曲゜)o</span>
<span title="nu">ε=怒ε=怒ε=怒ε=怒ε=( o`ω′)ノ</span>
<span title="o">(⊙o⊙)?</span>
<span title="ohno">Oh~ no!!!!</span>
-<span title="ohye">Oh yeah!\(^&^)/</span>
+<span title="ohye">Oh yeah!\(^&^)/</span>
<span title="ok">OK</span>
<span title="paidui">λ…λλ…λ…入λλ…</span>
<span title="pao">ε = = (づ′▽`)づ</span>
<span title="pao">ヾ(*′▽`*)ノ彡☆ノヽノヽノヽ</span>
<span title="pdr">ヾ(′▽`* )ノ~</span>
<span title="pia">( ̄ε(# ̄)☆╰╮o( ̄▽ ̄///) </span>
-<span title="pia">Pia!(o ‵-′)ノ”(ノ﹏<。)</span>
+<span title="pia">Pia!(o ‵-′)ノ”(ノ﹏<。)</span>
<span title="piao">(~ ̄▽ ̄)~</span>
<span title="piao">(~o ̄3 ̄)~</span>
<span title="piao">.....((/- -)/</span>
<span title="qing">( ^ ^) _U~~</span>
<span title="quan">(╬ ̄皿 ̄)=○#( ̄#)3 ̄)</span>
<span title="quan">(Д゜(○=(゜ 皿゜)=○)゜Д゜)</span>
-<span title="shengqi"><(-︿-)></span>
+<span title="shengqi"><(-︿-)></span>
<span title="shy">shy~ o(*////▽////*)q</span>
<span title="sigh">( ′ 3`) sigh~</span>
<span title="S奥特曼">三三三三三三三三三4(o|o ) </span>
-<span title="S小孩!"> (o ‵-′)ノ”(ノ_<。)</span>
-<span title="t"><(  ̄^ ̄)(θ(θ☆( >_< </span>
+<span title="S小孩!"> (o ‵-′)ノ”(ノ_<。)</span>
+<span title="t"><(  ̄^ ̄)(θ(θ☆( >_< </span>
<span title="tanshou">╮( ╯ 3 ╰ )╭</span>
-<span title="tanshou">╮( ̄▽ ̄")╭ </span>
+<span title="tanshou">╮( ̄▽ ̄")╭ </span>
<span title="tanshou">╮(╯-╰)╭</span>
<span title="tanshou">ㄟ( ▔, ▔ )ㄏ</span>
-<span title="tao">ε=ε=┏( >_<)┛</span>
+<span title="tao">ε=ε=┏( >_<)┛</span>
<span title="tao">ε=ε=ε=┏(゜ロ゜;)┛ </span>
<span title="tao">ε=ε=ε=ε=ヽ(* ̄o ̄)ノ</span>
<span title="tat">o(≧∩≦)o</span>
<span title="toukui">|壁|_☆)</span>
<span title="toukui">┬┴┤_·)</span>
<span title="touxiang">n(→_←)┛</span>
-<span title="touxiang">o( >﹏<。)┛</span>
+<span title="touxiang">o( >﹏<。)┛</span>
<span title="tun">0^)吞!</span>
<span title="tushetou">( ̄┰ ̄*)</span>
<span title="wa">(PД`q。)·。'゜</span>
-<span title="wakkk"><( ̄▽ ̄)/</span>
+<span title="wakkk"><( ̄▽ ̄)/</span>
<span title="wc">∥wc∥ o(- -o) =з =з =з</span>
-<span title="weiguan">(﹁"﹁)</span>
+<span title="weiguan">(﹁"﹁)</span>
<span title="weiqu">╥﹏╥...</span>
<span title="wo">σ(⌒ー⌒)</span>
-<span title="woniu">@/"</span>
+<span title="woniu">@/"</span>
<span title="wow">wow~⊙o⊙</span>
<span title="xiaoxin">ㄟ( ▔, ▔ )ㄏ</span>
<span title="xiey">( ﹁ ﹁ ) ~→</span>
<span title="xiey">( ̄. ̄)+</span>
-<span title="xiey">(﹁"﹁)</span>
+<span title="xiey">(﹁"﹁)</span>
<span title="xiezi">...ψ(。。 )</span>
<span title="xingfu">o(* ̄▽ ̄*)o</span>
<span title="xiong">(* ̄(エ) ̄)</span>
<span title="xiong">(+(工)+╬)</span>
<span title="xiu">o(*////▽////*)q</span>
<span title="xiu">p(# ̄▽ ̄#)o</span>
-<span title="xxoo">卐~%?…,# *'☆&℃$︿★?……</span>
+<span title="xxoo">卐~%?…,# *'☆&℃$︿★?……</span>
<span title="xxoo">╳╳○○</span>
<span title="y">(* ̄︶ ̄)y</span>
<span title="y">(* ̄▽ ̄)y</span>
<span title="y">^_^)y</span>
<span title="yanshen">━┳━ ━┳━</span>
<span title="yanwenzi">ag108lau</span>
-<span title="yessir">Yes,sir! <( ̄O ̄)/</span>
+<span title="yessir">Yes,sir! <( ̄O ̄)/</span>
<span title="yiqi">╭(′▽`)╭(′▽`)╯</span>
<span title="yiqi">ヽ( ̄ω ̄( ̄ω ̄〃)ゝ</span>
<span title="yo">(^U^)ノ~YO </span>
-<span title="yu">>°)))>彡</span>
+<span title="yu">>°)))>彡</span>
<span title="yun">(((φ(◎ロ◎;)φ)))</span>
<span title="zhaoxiang">Σ[ ◎ ]}</span>
-<span title="zhi"><( ̄ ﹌  ̄)@m</span>
+<span title="zhi"><( ̄ ﹌  ̄)@m</span>
<span title="zhu">^(* ̄(oo) ̄)^</span>
<span title="zhua">W( ̄_ ̄)W</span>
-<span title="zhuangqiang">┳G┻F┳W┫☆(ノ﹏<。)</span>
-<span title="zhuisha">--==≡≡〈〈《( / ̄皿 ̄)=O));>o<)/</span>
+<span title="zhuangqiang">┳G┻F┳W┫☆(ノ﹏<。)</span>
+<span title="zhuisha">--==≡≡〈〈《( / ̄皿 ̄)=O));>o<)/</span>
<span title="zuomeng">ZZzz…(。-ω-)..ooO((【·:*:~夢~:*:·】))</span>
<span title="哎哟哟……">( ̄y▽, ̄)╭ </span>
<span title="安安啦~~~"> o(* ̄▽ ̄*)ブ</span>
<span title="鄙视你!">╭∩╮(︶︿︶)╭∩╮</span>
<span title="壁">(  ̄  ̄)σ…( _ _)ノ|</span>
<span title="壁">(  ̄  ̄)σ…( _ _)ノ|</span>
-<span title="壁">ノ ̄ー ̄)ノ ⌒ >┼○"☆||</span>
+<span title="壁">ノ ̄ー ̄)ノ ⌒ >┼○"☆||</span>
<span title="便秘">o(′益`)o </span>
<span title="辫子">§(* ̄▽ ̄*)§</span>
-<span title="表!"><( ̄3 ̄)> </span>
+<span title="表!"><( ̄3 ̄)> </span>
<span title="别走啊~~">______λ......___丬</span>
<span title="瘪嘴">(* ̄︿ ̄) </span>
<span title="冰天雪地掩面泪奔……">(PД`q。)·。'゜</span>
<span title="草泥马">( ·ェ·)(·ェ· )</span>
<span title="蹭">(*≧︶≦))( ̄▽ ̄* )ゞ</span>
<span title="蹭">( * ̄▽ ̄)((≧︶≦*) </span>
-<span title="叉腰"><)。(> </span>
+<span title="叉腰"><)。(> </span>
<span title="超强风扇吹">ε~( ~( ~ ( 卍 )\( ̄▽ ̄ \)</span>
<span title="超远程BB枪!">(# ̄□ ̄)o―∈‥oo━━━━━━━☆ </span>
<span title="車">●┻┓⌒ Σ┌┘車└┐=3 =3 =3</span>
<span title="吃饭去鸟">.....(((((ヾ( o=^·ェ·)o ┏━┓</span>
<span title="吃我一鞭!">( `0‘)ノ~~~~~~~~~ν</span>
-<span title="吃药">(。>︿<)_θ</span>
+<span title="吃药">(。>︿<)_θ</span>
<span title="冲出!!">___*\(  ̄皿 ̄)/#____</span>
<span title="抽!!">( ̄ε(# ̄)☆╰╮( ̄▽ ̄///)</span>
<span title="抽泣">(ノへ ̄、)</span>
<span title="大鼻子">(′台` ) </span>
<span title="呆滞"> ━┳━ ━┳━</span>
<span title="淡定">━━( ̄ー ̄*|||━━</span>
-<span title="当然!"><(ˉ^ˉ)></span>
+<span title="当然!"><(ˉ^ˉ)></span>
<span title="刀疤">(-_-メ)</span>
<span title="等等我…我……我…………">...(* ̄0 ̄)ノ</span>
<span title="低落"> (#`-_ゝ-)</span>
<span title="抖">o((⊙﹏⊙))o. </span>
<span title="嘟嘴">o( ̄ε ̄*) </span>
<span title="嘟嘴">(○` 3′○) </span>
-<span title="对不起~"> <(_ _)></span>
+<span title="对不起~"> <(_ _)></span>
<span title="呃~被发现了......">(ˉ▽ˉ;)</span>
<span title="呃~我……">σ(-_-メ)</span>
<span title="翻桌!">(╯‵□′)╯︵┻━┻</span>
<span title="防御!">(((\( ̄一 ̄)/)))</span>
<span title="放我出去~~~"> ||Φ|(|T|Д|T|)|Φ|| </span>
<span title="飞吻"> (* ̄3 ̄)╭</span>
-<span title="分裂">>( ̄▽ ̄ =  ̄︿ ̄)<</span>
+<span title="分裂">>( ̄▽ ̄ =  ̄︿ ̄)<</span>
<span title="风魔法!"> (/-_-)/ξ ξ ξ ξ ξ ξ (+_+ /)/~~~</span>
<span title="去去去~">乀ˉεˉ乀...</span>
<span title="扶眼镜">(-@y@) </span>
<span title="扶眼镜">(-@y@) </span>
<span title="复活!">...:.;::..;::: .:.;::….;: ̄)…:.;:□ ̄)( ̄□ ̄*)</span>
-<span title="嘎~嘎~嘎~">.<{=....</span>
+<span title="嘎~嘎~嘎~">.<{=....</span>
<span title="干杯">( ̄▽ ̄)~■□~( ̄▽ ̄)</span>
<span title="干杯!">~( ̄▽ ̄)~* </span>
<span title="感动!">o(*≧▽≦*)m</span>
<span title="滚来滚去">……~(~o ̄▽ ̄)~o 。。。……o~(_△_o~) ~。。。</span>
<span title="含泪挥手帕">(ToT)/~~~</span>
<span title="好~~">o(*^▽^*)o </span>
-<span title="好吧">╮╯-╰╭"</span>
+<span title="好吧">╮╯-╰╭"</span>
<span title="好苦~">( >﹏<)</span>
<span title="好香~~">(╯▽╰ )</span>
<span title="好主意!">(o゜▽゜)o☆</span>
<span title="获胜者是……">ヾ( ̄ー ̄)X(^▽^)ゞ</span>
<span title="击掌">(〃 ̄︶ ̄)人( ̄︶ ̄〃)</span>
<span title="加油">o^^oo^^o</span>
-<span title="交通志愿老大妈指挥ing..."> (o^~^)尸"</span>
+<span title="交通志愿老大妈指挥ing..."> (o^~^)尸"</span>
<span title="金盾!">||┣(—_\) </span>
-<span title="就你!"><( ̄ ﹌  ̄)@m</span>
+<span title="就你!"><( ̄ ﹌  ̄)@m</span>
<span title="就你好了~"> (@゜▽゜)</span>
<span title="就是他!"> (@`д′)</span>
<span title="举手">o(*^▽^*)┛</span>
<span title="苦恼"> ( -'`-; )</span>
<span title="快使用双截棍,">┗(`o′)┓哼┏(`○′)┛哼┏(`o′)┓哈┗(`O′)┛兮!!</span>
<span title="困,揉眼睛……">(o-ωq)).oO</span>
-<span title="啦啦啦">...φ(0 ̄*)_φ(* ̄0 ̄)></span>
+<span title="啦啦啦">...φ(0 ̄*)_φ(* ̄0 ̄)></span>
<span title="来啦~">(~o ̄▽ ̄)~o ~。。。</span>
<span title="来人呐~">(o ;′Д`)ノ゛</span>
<span title="冷笑">(  ̄ー ̄)</span>
<span title="列队">(* ̄^ ̄(* ̄^ ̄(* ̄^ ̄)</span>
<span title="铃铃铃">☆{{{Д}}} ☆!! </span>
<span title="毛毛虫">(· ·)nnn </span>
-<span title="没办法~">╮( ̄▽ ̄")╭</span>
+<span title="没办法~">╮( ̄▽ ̄")╭</span>
<span title="没人在哦?">||o(*°ω°*)o|Ю </span>
<span title="媚眼">ο(=·ω<=)ρ⌒☆</span>
<span title="秘密">(一-一) </span>
<span title="喵~">o( =∩ω∩= )m </span>
<span title="喵~">>▽<</span>
-<span title="咩哈哈哈哈……"><(* ̄▽ ̄*)/</span>
+<span title="咩哈哈哈哈……"><(* ̄▽ ̄*)/</span>
<span title="蔑视">( ̄_, ̄ )</span>
<span title="命苦...">ε(┬┬﹏┬┬)3</span>
<span title="摸摸头">(~ ̄▽ ̄)ノ</span>
<span title="念力~"> ( -人-)···-~=~≡~≡ ((+o+)))</span>
<span title="念咒">((( (-h-) )))</span>
<span title="念咒">……(((\( ̄一 ̄)/)))</span>
-<span title="捏耳朵!"><( ‵□′)>───Cε(┬﹏┬)3</span>
+<span title="捏耳朵!"><( ‵□′)>───Cε(┬﹏┬)3</span>
<span title="怒">ε=怒ε=怒ε=怒ε=怒ε=( o`ω′)/</span>
<span title="哦~">_( ̄0 ̄)_</span>
<span title="啪叽~摔一跟头……">((o_ _)'彡☆</span>
<span title="忍术~隐!"> ( ̄人 ̄)( ̄人:.;:…( ̄...:.;::..;::: .:;.…::;.:..:;.:...</span>
<span title="撒花!">( ̄▽ ̄)o∠※PAN!=.:*:'☆.:*:'★':* </span>
<span title="撒花!">*★,°*:.☆\( ̄▽ ̄)/$:*.°★* 。</span>
-<span title="散弹发射!!">▄︻┻┳═一∵∴∷∶∵ (∵_,∵)>>>></span>
+<span title="散弹发射!!">▄︻┻┳═一∵∴∷∶∵ (∵_,∵)>>>></span>
<span title="杀虫剂!">( ▼▼)/鹵〈 巛巛巛 ( ◎_x)/</span>
<span title="闪人">(* ̄▽ ̄)( ̄▽:;.…::;.:.:::;..::;.:... </span>
<span title="伤心">(;′⌒`)</span>
<span title="蛇拳">z(-_-z)).....((s-_-)s</span>
-<span title="射箭">(  ̄ー ̄)——)-=======>-->></span>
+<span title="射箭">(  ̄ー ̄)——)-=======>-->></span>
<span title="神啊~">\( ̄0 ̄)/</span>
<span title="失落">(。_。) </span>
<span title="石化">━━∑( ̄□ ̄*|||━━化</span>
<span title="衰">(′д` )…彡…彡</span>
<span title="死亡中">(:D)┼─┤</span>
<span title="太好笑了!!">……o((≧▽≦o)</span>
-<span title="太可怕了">ヽ(*。>Д<)o゜</span>
-<span title="逃命啊~~">\("▔□▔)/\("▔□▔)/ </span>
+<span title="太可怕了">ヽ(*。>Д<)o゜</span>
+<span title="逃命啊~~">\("▔□▔)/\("▔□▔)/ </span>
<span title="陶醉">( *︾▽︾)</span>
-<span title="讨厌啦~">(ノω<。)ノ))☆.。</span>
+<span title="讨厌啦~">(ノω<。)ノ))☆.。</span>
<span title="天旋地转">ヾ( )ノ゛ヾ( °д)ノ゛ヾ(°д°)ノ゛ヾ(д° )ノ゛ヾ( )ノ゛</span>
<span title="天助我也~"> ヾ(*′▽`*)彡</span>
-<span title="挑衅"><(* ̄ー ̄)ゞ来呀~</span>
-<span title="挑衅"><(* ̄ー ̄)ゞ来啊~</span>
+<span title="挑衅"><(* ̄ー ̄)ゞ来呀~</span>
+<span title="挑衅"><(* ̄ー ̄)ゞ来啊~</span>
<span title="偷看">(/ω\*)……… (/ω·\*) </span>
<span title="偷看">(/ω·\*) </span>
<span title="偷拍 ">Σ[ ◎ ]}ー′)</span>
<span title="怒">凸艹皿艹</span>
<span title="靠">凸゜皿゜メ</span>
-<span title="吐">( >ρ < ”)</span>
+<span title="吐">( >ρ < ”)</span>
<span title="推推~起床啦!">(o ̄ω ̄)○))o(__*)Zzz</span>
-<span title="拖走">ヽ(゜▽゜ )-C<(/;◇;)/~</span>
+<span title="拖走">ヽ(゜▽゜ )-C<(/;◇;)/~</span>
<span title="哇卡卡卡卡卡……">o((≧▽≦o) 太好笑了!!</span>
-<span title="哇咧!">Σ(⊙▽⊙"a...</span>
+<span title="哇咧!">Σ(⊙▽⊙"a...</span>
<span title="挖鼻屎"> (* ̄rǒ ̄)</span>
<span title="万岁!">*★,°*:.☆\( ̄▽ ̄)/$:*.°★* 。</span>
<span title="围观!">(← ← )</span>
<span title="我错了……">(。﹏。*)</span>
<span title="我回来啦~">||ヽ(* ̄▽ ̄*)ノミ|Ю</span>
<span title="我来了~">(~ ̄▽ ̄)~</span>
-<span title="我忍!">o(-"-;) </span>
+<span title="我忍!">o(-"-;) </span>
<span title="我闪!">|(·_·) |·_·) |_·) |·) | )</span>
<span title="握拳!">o( ̄ヘ ̄o* )</span>
<span title="握拳!">o( ̄ヘ ̄o#)</span>
-<span title="呜呜呜……">( >﹏<。)~</span>
+<span title="呜呜呜……">( >﹏<。)~</span>
<span title="无敌!">↑↑↓↓←→←→BA...┗( -o-)┛</span>
-<span title="无敌弹簧拳!">( ‵Д′)=○))~~~~~~Ю))>o<)/ </span>
+<span title="无敌弹簧拳!">( ‵Д′)=○))~~~~~~Ю))>o<)/ </span>
<span title="无敌幻影脚!">ヽ(ヽ `д′)ヽ`д′)ヽ`д′)┌┛┌┛┌┛★)`з゜)y</span>
-<span title="无敌捏脸功!"><( ‵□′)───C<─___-)|| </span>
+<span title="无敌捏脸功!"><( ‵□′)───C<─___-)|| </span>
<span title="无敌肉包拳!">(o  ̄3)==@))゜ロ゜((@==(′ε′ )o </span>
<span title="无敌肉包拳!">(o  ̄3)==@))゜ロ゜((@==(′ε′ )o</span>
<span title="无敌影分身!">((≧(≧▽(≧▽≦(≧▽≦)≧▽≦)▽≦)≦))) </span>
<span title="无影脚!"><(  ̄︿ ̄)︵θ︵θ︵θ︵θ︵☆(>口<-)</span>
<span title="享受">(╯▽╰ ) </span>
<span title="消失">(* ̄□ ̄)( ̄□:;.…::;.:.:::;..::;.:...</span>
-<span title="小新"><( ̄︶ ̄)↗</span>
+<span title="小新"><( ̄︶ ̄)↗</span>
<span title="邪恶">( ‵▽′)ψ</span>
<span title="谢啦!!">☆⌒(*^-゜)v </span>
<span title="心神不宁...">(゜゜ )(。。)(゜゜ )(。。)</span>
<span title="欣慰">( ╯▽╰)</span>
-<span title="要">不>( ̄ε ̄ =  ̄3 ̄)<</span>
+<span title="要">不>( ̄ε ̄ =  ̄3 ̄)<</span>
<span title="噎死">( *⊙~⊙) </span>
<span title="噎住">( *⊙~⊙) </span>
<span title="隐身!">(* ̄□ ̄)( ̄□:;.…::;.:.:::;..::;.:...</span>
<span title="御风_凌"></span>
<span title="怨.念....">o(一︿一+)o</span>
<span title="运动">╔囧╗╔囧╝╚囧╝╚囧╗</span>
-<span title="晕!">@o@"</span>
+<span title="晕!">@o@"</span>
<span title="糟糕!">X﹏X</span>
<span title="早安呀~~~"> o(* ̄▽ ̄*)ブ</span>
<span title="早点回来哦~">(~ ̄(OO) ̄)ブ</span>
<span title="炸弹!">(╯‵□′)╯···*~●</span>
<span title="斩!!">ˋ( ° ▽、° ) (o( ̄▽ ̄///</span>
<span title="涨">( ̄︶ ̄)↗</span>
-<span title="这个……呃~~">-______-"</span>
+<span title="这个……呃~~">-______-"</span>
<span title="真哒?!"> o(〃'▽'〃)o</span>
<span title="真空波动拳!">( `o′){ ···-=≡))</span>
<span title="真空波动拳!">( `o′){ ···-=≡))</span>
-<span title="振奋">(o>ε(o>u(≧∩≦) </span>
+<span title="振奋">(o>ε(o>u(≧∩≦) </span>
<span title="振作!">━━(o_ _)o━━(o―_―)o━━(9 ̄ー ̄)9</span>
<span title="痣长毛">( ゜,_ゝ゜) </span>
-<span title="皱眉">(-"-)</span>
-<span title="抓狂">o((>ω< ))o</span>
-<span title="抓狂">o(>@<)o</span>
+<span title="皱眉">(-"-)</span>
+<span title="抓狂">o((>ω< ))o</span>
+<span title="抓狂">o(>@<)o</span>
<span title="足球">( · ·)L☆ .....○ 冂 </span>
-<span title="醉拳">ヨロ (*~▽~)ノ ヨロ ヽ(~▽~*)ヨロ (*~▽~)―〇 ☆ バシ ))>口<)</span>
+<span title="醉拳">ヨロ (*~▽~)ノ ヨロ ヽ(~▽~*)ヨロ (*~▽~)―〇 ☆ バシ ))>口<)</span>
<p style="display: block; float: left; margin-top: 25px; margin-bottom: -40px;">© 2010 @ag108lau<br>Thanks @OnlyTiny<br />
Last Update: 2010-11-13
-</p>
\ No newline at end of file
+</p>
$userid = $id;
{
switch ($type) {
+ case 'mutes':
+ echo $userid ? "You can't view others' muting!" : "
+ <h2 style='margin: 10px 0pt 20px 15px'>
+ <span>Muting</span>
+ </h2>
+ <div id='subnav'>
+ <span class='subnavLink'><a href='friends.php'>Following</a></span>
+ <span class='subnavLink'><a href='followers.php'>Followers</a></span>
+ <span class='subnavNormal'>Muting</span>
+ <span class='subnavLink'><a href='blocks.php'>Blocking</a></span>
+ </div>";
+ break;
case 'blocks':
echo $userid ? "You can't view others' blocking!" : "
<h2 style='margin: 10px 0pt 20px 15px'>
- <span>People I'm blocking</span>
+ <span>Blocking</span>
</h2>
<div id='subnav'>
- <span class='subnavLink'><a href='friends.php'>People I'm following</a></span>
- <span class='subnavLink'><a href='followers.php'>People who follow me</a></span>
- <span class='subnavNormal'>People I'm blocking</span>
+ <span class='subnavLink'><a href='friends.php'>Following</a></span>
+ <span class='subnavLink'><a href='followers.php'>Followers</a></span>
+ <span class='subnavLink'><a href='mutes.php'>Muting</a></span>
+ <span class='subnavNormal'>Blocking</span>
</div>";
break;
case 'friends':
echo $userid ? "
<h2 style='margin: 10px 0pt 20px 15px'>
- <span>People <a href='user.php?id=$userid'>" . $userid . "</a> is following</span>
+ <span><a href='user.php?id=$userid'>" . $userid . "</a> is following</span>
</h2>
<div id='subnav'>
- <span class='subnavNormal'>People <b>" . $userid . "</b> is following</span>
- <span class='subnavLink'><a href='followers.php?id=$userid'>People who follow <b>" . $userid . "</b></a></span>
+ <span class='subnavNormal'><b>" . $userid . "</b> is following</span>
+ <span class='subnavLink'><a href='followers.php?id=$userid'>Who follows <b>" . $userid . "</b></a></span>
</div>" : "
<h2 style='margin: 10px 0pt 20px 15px'>
- <span>People I'm following</span>
+ <span>Following</span>
</h2>
<div id='subnav'>
- <span class='subnavNormal'>People I'm following</span>
- <span class='subnavLink'><a href='followers.php'>People who follow me</a></span>
- <span class='subnavLink'><a href='block.php'>People I'm blocking</a></span>
+ <span class='subnavNormal'>Following</span>
+ <span class='subnavLink'><a href='followers.php'>Followers</a></span>
+ <span class='subnavLink'><a href='mutes.php'>Muting</a></span>
+ <span class='subnavLink'><a href='blocks.php'>Blocking</a></span>
</div>";
break;
case 'followers':
echo $userid ? "
<h2 style='margin: 10px 0pt 20px 15px'>
- <span>People who follow <a href='user.php?id=$userid'>" . $userid . "</a></span>
+ <span>Who follow <a href='user.php?id=$userid'>" . $userid . "</a></span>
</h2>
<div id='subnav'>
- <span class='subnavLink'><a href='friends.php?id=$userid'>People <b>" . $userid . "</b> is following</a></span>
- <span class='subnavNormal'>People who follow <b>" . $userid . "</b></span>
+ <span class='subnavLink'><a href='friends.php?id=$userid'><b>" . $userid . "</b> is following</a></span>
+ <span class='subnavNormal'>Who follow <b>" . $userid . "</b></span>
</div>" : "
<h2 style='margin: 10px 0pt 20px 15px'>
- <span>People who follow me</span>
+ <span>Followers</span>
</h2>
- <div id='subnav'><span class='subnavLink'><a href='friends.php'>People I'm following</a></span>
- <span class='subnavNormal'>People who follow me</span>
- <span class='subnavLink'><a href='block.php'>People I'm blocking</a></span>
+ <div id='subnav'><span class='subnavLink'><a href='friends.php'>Following</a></span>
+ <span class='subnavNormal'>Followers</span>
+ <span class='subnavLink'><a href='mutes.php'>Muting</a></span>
+ <span class='subnavLink'><a href='blocks.php'>Blocking</a></span>
</div>";
break;
case 'list_members':
<span class='subnavLink'><a href='list.php?id=$id'>Go back to the list</a></span>
</div>";
break;
- case 'browse':
- echo "<div id='subnav'><span class='subnavNormal'>See what people are saying about…</span></div>";
- break;
}
}
echo '<div class="clear"></div>';
switch ($type) {
+ case 'mutes':
+ $userlist = $t->mutesList($id, $p);
+ $next_page = $userlist->next_cursor_str;
+ $previous_page = $userlist->previous_cursor_str;
+ $userlist = $userlist->users;
+ break;
case 'blocks':
$userlist = $t->blockingList($id, $p);
$next_page = $userlist->next_cursor_str;
$prelist = $userlist->previous_cursor_str;
$userlist = $userlist->users;
break;
- case 'browse':
- $userlist = $t->followers($id, $p);
- break;
}
$empty = count($userlist) == 0 ? true : false;
if ($empty) {
";
if ($user->description) $output .= "<span class=\"rank_description\"><b>Bio:</b> $user->description</span>";
$list_id = explode("/",$id);
- if ($type == 'list_members' && $list_id[0] == $t->username) $output .= "<span class=\"status_info\"><a class=\"delete_btn list_delete_btn\" href=\"#\">delete</a></span>";
+ if ($type == 'list_members' && $list_id[0] == $t->username) $output .= "<span class=\"status_info\"><a class=\"list_delete_btn fa fa-trash-o\" href=\"#\" title=\"Delete member\"></a></span>";
$output .= "
</div>
</li>
}
$output .= "</ol><div id=\"pagination\">";
if ($type == 'list_members' || $type == 'list_followers' || $type == 'blocks') {
- if ($prelist != 0) $output .= "<a id=\"less\" class=\"round more\" style=\"float: left;\" href=\"list_members.php?id=$id&c=$prelist\">Back</a>";
- if ($nextlist != 0) $output .= "<a id=\"more\" class=\"round more\" style=\"float: right;\" href=\"list_members.php?id=$id&c=$nextlist\">Next</a>";
+ if ($prelist != 0) $output .= "<a id=\"less\" class=\"btn btn-white\" style=\"float: left;\" href=\"list_members.php?id=$id&c=$prelist\">Back</a>";
+ if ($nextlist != 0) $output .= "<a id=\"more\" class=\"btn btn-white\" style=\"float: right;\" href=\"list_members.php?id=$id&c=$nextlist\">Next</a>";
} else {
if ($id) {
if ($previous_page !== "0")
- $output .= "<a id=\"less\" class=\"round more\" style=\"float: left;\" href=\"$type.php?id=$id&p=" . $previous_page . "\">Back</a>";
+ $output .= "<a id=\"less\" class=\"btn btn-white\" style=\"float: left;\" href=\"$type.php?id=$id&p=" . $previous_page . "\">Back</a>";
if ($next_page !== "0")
- $output .= "<a id=\"more\" class=\"round more\" style=\"float: right;\" href=\"$type.php?id=$id&p=" . $next_page . "\">Next</a>";
+ $output .= "<a id=\"more\" class=\"btn btn-white\" style=\"float: right;\" href=\"$type.php?id=$id&p=" . $next_page . "\">Next</a>";
} else {
if ($previous_page !== "0")
- $output .= "<a id=\"less\" class=\"round more\" style=\"float: left;\" href=\"$type.php?p=" . $previous_page . "\">Back</a>";
+ $output .= "<a id=\"less\" class=\"btn btn-white\" style=\"float: left;\" href=\"$type.php?p=" . $previous_page . "\">Back</a>";
if ($next_page !== "0")
- $output .= "<a id=\"more\" class=\"round more\" style=\"float: right;\" href=\"$type.php?p=" . $next_page . "\">Next</a>";
+ $output .= "<a id=\"more\" class=\"btn btn-white\" style=\"float: right;\" href=\"$type.php?p=" . $next_page . "\">Next</a>";
}
}
$output .= "</div>";
include ('inc/header.php');
if (!loginStatus()) header('location: login.php');
- $t = getTwitter();
- if (isset($_POST['status']) && isset($_POST['in_reply_to'])) {
- if (trim($_POST['status']) !== '')
- {
- $result = $t->update($_POST['status'], $_POST['in_reply_to']);
- if ($result)
- {
- $user = $result->user;
- $time = $_SERVER['REQUEST_TIME']+3600*24*365;
- if ($user)
- {
- setcookie('friends_count', $user->friends_count, $time, '/');
- setcookie('statuses_count', $user->statuses_count, $time, '/');
- setcookie('followers_count', $user->followers_count, $time, '/');
- setcookie('imgurl', getAvatar($user->profile_image_url), $time, '/');
- setcookie('name', $user->name, $time, '/');
- }
- }
- }
- header('location: index.php');
- }
?>
<script src="js/home.js"></script>
<div id="statuses" class="column round-left">
$since_id = isset($_GET['since_id']) ? $_GET['since_id'] : false;
$max_id = isset($_GET['max_id']) ? $_GET['max_id'] : false;
+ $t = getTwitter();
$statuses = $t->homeTimeline($since_id, $max_id);
if ($statuses == false)
{
- header('location: error.php');exit();
+ header('location: error.php?code='.$t->http_code);exit();
}
$count = count($statuses);
$empty = $count == 0 ? true : false;
$time = $_SERVER['REQUEST_TIME']+3600;
setcookie('maxid',$statuses[$count-1]->id_str,$time,'/');
- $output .= "<a id=\"less\" class=\"round more\" style=\"float: left;\" href=\"index.php?since_id=" . $firstid . "\">Back</a>";
- $output .= "<a id=\"more\" class=\"round more\" style=\"float: right;\" href=\"index.php?max_id=" . $lastid . "\">Next</a>";
+ $output .= "<a id=\"less\" class=\"btn btn-white\" style=\"float: left;\" href=\"index.php?since_id=" . $firstid . "\">Back</a>";
+ $output .= "<a id=\"more\" class=\"btn btn-white\" style=\"float: right;\" href=\"index.php?max_id=" . $lastid . "\">Next</a>";
$output .= "</div>";
echo $output;
}
formFunc();
$("ol.timeline").click(function(e) {
var $this = $(e.target);
- var type = $this.attr('class');
+ var matches = ($this.attr('class') || '').match(/\w+_btn/);
+ var type = matches ? matches[0] : '';
switch(type) {
case 'rt_btn':
e.preventDefault();
e.preventDefault();
onDelete($this);
break;
- case 'rt_undo':
+ case 'unrt_btn':
e.preventDefault();
onUndoRt($this);
break;
}
});
markReply($("#allTimeline > li"));
- $("#submit_btn").click(function (e) {
- updateStatus();
- e.preventDefault();
- });
document.onclick = function () {
document.title = document.title.replace(/(\([0-9]+\))/g, "");
$(".allHighLight").text($(".allHighLight").text().replace(/(\([0-9]+\))/g, ""));
$("div.new").filter(":first").remove();
$("span.tweetcount").filter(":last").text(navNum + len);
}
- $("span.big-retweet-icon").tipsy({
- gravity: 's'
- });
previewMedia(source);
}
PAUSE_TIMELINE = false;
$(function(){
- formFunc();
- $("ol.timeline").live("click", function(e) {
- var $this = $(e.target);
- var type = $this.attr('class');
- switch(type) {
- case 'rt_btn':
- e.preventDefault();
- onRT($this);
- break;
- case 'retw_btn':
- e.preventDefault();
- onNwRT($this);
- break;
- case 'replie_btn':
- e.preventDefault();
- onReplie($this,e);
- break;
- case 'favor_btn':
- e.preventDefault();
- onFavor($this);
- break;
- case 'unfav_btn':
- e.preventDefault();
- UnFavor($this);
- break;
- case 'delete_btn':
- e.preventDefault();
- onDelete($this);
- break;
- case 'rt_undo':
- case 'unrt_btn':
- e.preventDefault();
- onUndoRt($this);
- break;
- case 'msg_replie_btn':
- e.preventDefault();
- onReplieDM($this);
- break;
- case 'msg_delete_btn':
- e.preventDefault();
- onDeleteMsg($this);
- break;
- }
- });
- $("#submit_btn").click(function(e){
- updateStatus();
+ formFunc();
+ $(document).on("click", "ol.timeline", function(e) {
+ var $this = $(e.target);
+ var matches = ($this.attr('class') || '').match(/\w+_btn/);
+ var type = matches ? matches[0] : '';
+ switch(type) {
+ case 'rt_btn':
e.preventDefault();
- });
+ onRT($this);
+ break;
+ case 'retw_btn':
+ e.preventDefault();
+ onNwRT($this);
+ break;
+ case 'replie_btn':
+ e.preventDefault();
+ onReplie($this,e);
+ break;
+ case 'favor_btn':
+ e.preventDefault();
+ onFavor($this);
+ break;
+ case 'unfav_btn':
+ e.preventDefault();
+ UnFavor($this);
+ break;
+ case 'delete_btn':
+ e.preventDefault();
+ onDelete($this);
+ break;
+ case 'unrt_btn':
+ e.preventDefault();
+ onUndoRt($this);
+ break;
+ }
});
+});
expires: 30
}
$(function (){
+ $(document).on("click", "#media_preview > li > a", function(){
+ var li = this.parentNode;
+ li.parentNode.removeChild(li);
+ leaveWord();
+ });
$("#photoBtn").click(function (){
$("#photoArea").slideToggle(100);
});
});
$("#symbols span").click(function (){
var obj = document.getElementById('textbox');
- var str = $(this).html();
+ var str = $(this).text();
if(document.selection){
obj.focus();
var sel=document.selection.createRange();
updateSentTip("Your previous tweet has been restored!", 3e3, "success");
});
$("#autoBtn").click(function(){
- if ($("#autoBtn").hasClass("pause")){
+ if ($("#autoBtn").hasClass("fa-pause")){
clearInterval(UPDATE_INTERVAL);
- $("#autoBtn").removeClass("pause").addClass("start");
+ $("#autoBtn").removeClass("fa-pause").addClass("fa-play");
updateSentTip("Auto refresh deactivated!", 3e3, "success");
}else{
setUpdateInterval();
- $("#autoBtn").removeClass("start").addClass("pause");
+ $("#autoBtn").removeClass("fa-play").addClass("fa-pause");
updateSentTip("Auto refresh activated!", 3e3, "success");
update();
}
update();
updateSentTip("Retrieving new tweets...", 3e3, "ing");
});
- $("#transBtn").click(function (){
- $("#transArea").slideToggle(100);
- });
$("#filterSubmit").click(function (e){
e.preventDefault();
if ($.trim($('#iptFilter').val()).length == 0){
updateSentTip("Filtered tweets have been restored!", 5e3, "success");
$('#statuses .filter').slideDown("fast");
});
- $("#filterHide").toggle(
-
- function (){
- $('#statuses .reply').slideUp("fast");
- $('#filterHide').val("Show @");
- }, function (){
+ $("#filterHide").on("click",function (e){
+ e.preventDefault();
+ if ($(this).data("show_mentions")=="yes"){
$('#statuses .reply').slideDown("fast");
$('#filterHide').val("Hide @");
- });
+ $(this).data("show_mentions","no");
+ } else {
+ $('#statuses .reply').slideUp("fast");
+ $('#filterHide').val("Show @");
+ $(this).data("show_mentions","yes");
+ }
+ });
$("#clearBtn").click(function(e){
e.preventDefault();
if (confirm("This will sweep your timeline and remove excess tweets, are you sure?")){
}
});
});
+
+ function createObjectURL(file) {
+ if (window.webkitURL) {
+ return window.webkitURL.createObjectURL(file);
+ }
+ return window.URL.createObjectURL(file);
+ }
+
+ function revokeObjectURL(url) {
+ if (window.webkitURL) {
+ return window.webkitURL.revokeObjectURL(url);
+ }
+ return window.URL.revokeObjectURL(url);
+ }
function ImageUpload(){
+ var fileEle = $("#imageFile")[0];
+ if (fileEle.files.length == 0) {
+ return;
+ }
updateSentTip("Uploading your image...", 10000, "ing");
+ var img = document.createElement('img');
+ img.src = createObjectURL(fileEle.files[0]);
+ img.onload = function() {
+ revokeObjectURL(img.src);
+ };
$.ajaxFileUpload({
url: 'ajax/uploadImage.php?do=image',
timeout: 60000,
fileElementId: 'imageFile',
dataType: 'json',
success: function (data, status){
- if (typeof(console) !== 'undefined' && console != null){
- console.info(data);
- }
- if (data.result != undefined && data.result == "success"){
- $("#textbox").val($("#textbox").val() + data.url);
+ $mediaPreview = $("#media_preview");
+ if (data.media_id != undefined && data.media_id != "error"){
+ if ($mediaPreview.length > 0) {
+ img.setAttribute("media_id", data.media_id);
+ var li = document.createElement('li');
+ var hyperlink = document.createElement('a');
+ li.appendChild(hyperlink);
+ hyperlink.title = "Remove";
+ var span = document.createElement('span');
+ span.className = "fa fa-times";
+ hyperlink.appendChild(img);
+ hyperlink.appendChild(span);
+ $mediaPreview[0].appendChild(li);
+ }
+ leaveWord();
updateSentTip("Your image has been uploaded!", 3e3, "success");
- $("#photoArea").slideToggle(100);
}else{
- console.log(data);
updateSentTip("Failed to upload, please try again.", 3e3, "failure");
- $("#photoArea").slideToggle(100);
}
},
error: function (data, status, e){
updateSentTip("Failed to upload, please try again.", 3e3, "failure");
- $("#photoArea").slideToggle(100);
- console.log(data);
}
})
return false;
var option ={ expire: 30 };
$(document).ready(function (){
enableFilter();
- if($.cookie('transLang') === null){
- $.cookie('transLang', 'en', option);
- }
- if($.cookie('myLangs') === null){
- $.cookie('myLangs', 'en', option);
- }
- var select = $('#transArea select[name=langs]');
- select.change(function(){
- var val = $(this).val();
- $.cookie('transLang', val, option);
- $.cookie('fullLang', $(this).find('option[value=' + val + ']').text(), option);
- })
- .find('option').each(function(){
- var lang = $.cookie('transLang')
- if(lang === null){
- lang = 'en';
- }
- if($(this).val() === lang){
- $(this).attr('selected', 'selected');
- }
- });
- var mylang = $('#transArea select[name=myLangs]');
- mylang.change(function(){
- var val = $(this).val();
- $.cookie('myLangs', val, option);
- })
- .find('option').each(function(){
- var lang = $.cookie('myLangs')
- if(lang === null){
- lang = 'en';
- }
- if($(this).val() === lang){
- $(this).attr('selected', 'selected');
- }
- });
- });
+});
formFunc();
$("#allTimeline").click(function(e) {
var $this = $(e.target);
- var type = $this.attr('class');
+ var matches = ($this.attr('class') || '').match(/\w+_btn/);
+ var type = matches ? matches[0] : '';
switch(type) {
case 'rt_btn':
e.preventDefault();
e.preventDefault();
onDelete($this);
break;
- case 'rt_undo':
+ case 'unrt_btn':
e.preventDefault();
onUndoRt($this);
break;
}
});
markReply($("#allTimeline > li"));
- $("#submit_btn").click(function (e) {
- e.preventDefault();
- updateStatus();
- });
- $("body").live("click", function (e) {
+ $("body").on("click", function (e) {
document.title = document.title.replace(/(\([0-9]+\))/g, "");
$(".new").remove();
});
$("div.new").filter(":first").remove();
$("span.tweetcount").filter(":last").text(num + $(msg).length - 1);
}
- $("span.big-retweet-icon").tipsy({
- gravity: 's'
- });
previewMedia(source);
} else {
updateSentTip('No new tweets', 3000, 'failure');
--- /dev/null
+diff --git a/js/jquery.embrr.utils.js b/js/jquery.embrr.utils.js
+index 1ee4786..ff41d14 100644
+--- a/js/jquery.embrr.utils.js
++++ b/js/jquery.embrr.utils.js
+@@ -729,6 +729,12 @@ jQuery.cookie = function (name, value, options) {
+ return this._error('end');
+ }
+
++ // added by esmizzle 2012-01-26 - update the path to the link for the next set of elements
++ var nexturl = $(data).find(opts.nextSelector).attr('href');
++ this._debug('nexturl: '+ nexturl)
++ this.options.path[0] = nexturl;
++ this.options.path[1] = '#pathcomplete';
++
+ // use a documentFragment because it works when content is going into a table or UL
+ frag = document.createDocumentFragment();
+ while (box[0].firstChild) {
+@@ -920,7 +926,8 @@ jQuery.cookie = function (name, value, options) {
+ // if we're dealing with a table we can't use DIVs
+ box = $(opts.contentSelector).is('table, tbody') ? $('<tbody/>') : $('<div/>');
+
+- desturl = (typeof path === 'function') ? path(opts.state.currPage) : path.join(opts.state.currPage);
++ desturl = (path[1] == '#pathcomplete') ? path[0] : path.join(opts.state.currPage); // only throw the currPage in there if we need it
++ instance._debug('desturl: '+desturl);
+ instance._debug('heading into ajax', desturl);
+
+ method = (opts.dataType === 'html' || opts.dataType === 'json' ) ? opts.dataType : 'html+callback';
--- /dev/null
+/*!
+ * jQuery Plugins Package for Embr
+ * https://embr.in/
+ *
+ * Copyright 2010-2011, Plugins Authors
+ * Packaged by Contributors
+ *
+ * Currently including:
+ * - Cookie
+ * - Color
+ * - Tipsy
+ * - Lazy Load
+ * - Infinite Scroll
+ * - Autocomplete
+ * - Timeago
+ * - caret
+ * - ajaxFileupload
+ */
+//Cookie
+jQuery.cookie = function (name, value, options) {
+ if (typeof value != 'undefined') {
+ options = options || {};
+ if (value === null) {
+ value = '';
+ options = $.extend({}, options);
+ options.expires = -1
+ }
+ var expires = '';
+ if (options.expires && (typeof options.expires == 'number' || options.expires.toUTCString)) {
+ var date;
+ if (typeof options.expires == 'number') {
+ date = new Date();
+ date.setTime(date.getTime() + (options.expires * 24 * 60 * 60 * 1000))
+ } else {
+ date = options.expires
+ }
+ expires = '; expires=' + date.toUTCString()
+ }
+ var path = options.path ? '; path=' + (options.path) : '';
+ var domain = options.domain ? '; domain=' + (options.domain) : '';
+ var secure = options.secure ? '; secure' : '';
+ document.cookie = [name, '=', encodeURIComponent(value), expires, path, domain, secure].join('')
+ } else {
+ var cookieValue = null;
+ if (document.cookie && document.cookie != '') {
+ var cookies = document.cookie.split(';');
+ for (var i = 0; i < cookies.length; i++) {
+ var cookie = jQuery.trim(cookies[i]);
+ if (cookie.substring(0, name.length + 1) == (name + '=')) {
+ cookieValue = decodeURIComponent(cookie.substring(name.length + 1));
+ break
+ }
+ }
+ }
+ return cookieValue
+ }
+};
+
+//Color
+(function (d) {
+ d.each(["backgroundColor", "borderBottomColor", "borderLeftColor", "borderRightColor", "borderTopColor", "color", "outlineColor"], function (f, e) {
+ d.fx.step[e] = function (g) {
+ if (!g.colorInit) {
+ g.start = c(g.elem, e);
+ g.end = b(g.end);
+ g.colorInit = true
+ }
+ g.elem.style[e] = "rgb(" + [Math.max(Math.min(parseInt((g.pos * (g.end[0] - g.start[0])) + g.start[0]), 255), 0), Math.max(Math.min(parseInt((g.pos * (g.end[1] - g.start[1])) + g.start[1]), 255), 0), Math.max(Math.min(parseInt((g.pos * (g.end[2] - g.start[2])) + g.start[2]), 255), 0)].join(",") + ")"
+ }
+ });
+
+ function b(f) {
+ var e;
+ if (f && f.constructor == Array && f.length == 3) {
+ return f
+ }
+ if (e = /rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(f)) {
+ return [parseInt(e[1]), parseInt(e[2]), parseInt(e[3])]
+ }
+ if (e = /rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(f)) {
+ return [parseFloat(e[1]) * 2.55, parseFloat(e[2]) * 2.55, parseFloat(e[3]) * 2.55]
+ }
+ if (e = /#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(f)) {
+ return [parseInt(e[1], 16), parseInt(e[2], 16), parseInt(e[3], 16)]
+ }
+ if (e = /#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(f)) {
+ return [parseInt(e[1] + e[1], 16), parseInt(e[2] + e[2], 16), parseInt(e[3] + e[3], 16)]
+ }
+ if (e = /rgba\(0, 0, 0, 0\)/.exec(f)) {
+ return a.transparent
+ }
+ return a[d.trim(f).toLowerCase()]
+ }
+
+ function c(g, e) {
+ var f;
+ do {
+ f = d.curCSS(g, e);
+ if (f != "" && f != "transparent" || d.nodeName(g, "body")) {
+ break
+ }
+ e = "backgroundColor"
+ } while (g = g.parentNode);
+ return b(f)
+ }
+ var a = {
+ aqua: [0, 255, 255],
+ azure: [240, 255, 255],
+ beige: [245, 245, 220],
+ black: [0, 0, 0],
+ blue: [0, 0, 255],
+ brown: [165, 42, 42],
+ cyan: [0, 255, 255],
+ darkblue: [0, 0, 139],
+ darkcyan: [0, 139, 139],
+ darkgrey: [169, 169, 169],
+ darkgreen: [0, 100, 0],
+ darkkhaki: [189, 183, 107],
+ darkmagenta: [139, 0, 139],
+ darkolivegreen: [85, 107, 47],
+ darkorange: [255, 140, 0],
+ darkorchid: [153, 50, 204],
+ darkred: [139, 0, 0],
+ darksalmon: [233, 150, 122],
+ darkviolet: [148, 0, 211],
+ fuchsia: [255, 0, 255],
+ gold: [255, 215, 0],
+ green: [0, 128, 0],
+ indigo: [75, 0, 130],
+ khaki: [240, 230, 140],
+ lightblue: [173, 216, 230],
+ lightcyan: [224, 255, 255],
+ lightgreen: [144, 238, 144],
+ lightgrey: [211, 211, 211],
+ lightpink: [255, 182, 193],
+ lightyellow: [255, 255, 224],
+ lime: [0, 255, 0],
+ magenta: [255, 0, 255],
+ maroon: [128, 0, 0],
+ navy: [0, 0, 128],
+ olive: [128, 128, 0],
+ orange: [255, 165, 0],
+ pink: [255, 192, 203],
+ purple: [128, 0, 128],
+ violet: [128, 0, 128],
+ red: [255, 0, 0],
+ silver: [192, 192, 192],
+ white: [255, 255, 255],
+ yellow: [255, 255, 0],
+ transparent: [255, 255, 255]
+ }
+})(jQuery);
+
+//Lazy Load
+(function (a) {
+ a.fn.lazyload = function (b) {
+ var c = {
+ threshold: 0,
+ failurelimit: 0,
+ event: "scroll",
+ effect: "show",
+ container: window
+ };
+ if (b) {
+ a.extend(c, b)
+ }
+ var d = this;
+ if ("scroll" == c.event) {
+ a(c.container).bind("scroll", function (b) {
+ var e = 0;
+ d.each(function () {
+ if (a.abovethetop(this, c) || a.leftofbegin(this, c)) {} else if (!a.belowthefold(this, c) && !a.rightoffold(this, c)) {
+ a(this).trigger("appear")
+ } else {
+ if (e++ > c.failurelimit) {
+ return false
+ }
+ }
+ });
+ var f = a.grep(d, function (a) {
+ return !a.loaded
+ });
+ d = a(f)
+ })
+ }
+ this.each(function () {
+ var b = this;
+ if (undefined == a(b).attr("original")) {
+ a(b).attr("original", a(b).attr("src"))
+ }
+ if ("scroll" != c.event || undefined == a(b).attr("src") || c.placeholder == a(b).attr("src") || a.abovethetop(b, c) || a.leftofbegin(b, c) || a.belowthefold(b, c) || a.rightoffold(b, c)) {
+ if (c.placeholder) {
+ a(b).attr("src", c.placeholder)
+ } else {
+ a(b).removeAttr("src")
+ }
+ b.loaded = false
+ } else {
+ b.loaded = true
+ }
+ a(b).one("appear", function () {
+ if (!this.loaded) {
+ a("<img />").bind("load", function () {
+ a(b).hide().attr("src", a(b).attr("original"))[c.effect](c.effectspeed);
+ b.loaded = true
+ }).attr("src", a(b).attr("original"))
+ }
+ });
+ if ("scroll" != c.event) {
+ a(b).bind(c.event, function (c) {
+ if (!b.loaded) {
+ a(b).trigger("appear")
+ }
+ })
+ }
+ });
+ a(c.container).trigger(c.event);
+ return this
+ };
+ a.belowthefold = function (b, c) {
+ if (c.container === undefined || c.container === window) {
+ var d = a(window).height() + a(window).scrollTop()
+ } else {
+ var d = a(c.container).offset().top + a(c.container).height()
+ }
+ return d <= a(b).offset().top - c.threshold
+ };
+ a.rightoffold = function (b, c) {
+ if (c.container === undefined || c.container === window) {
+ var d = a(window).width() + a(window).scrollLeft()
+ } else {
+ var d = a(c.container).offset().left + a(c.container).width()
+ }
+ return d <= a(b).offset().left - c.threshold
+ };
+ a.abovethetop = function (b, c) {
+ if (c.container === undefined || c.container === window) {
+ var d = a(window).scrollTop()
+ } else {
+ var d = a(c.container).offset().top
+ }
+ return d >= a(b).offset().top + c.threshold + a(b).height()
+ };
+ a.leftofbegin = function (b, c) {
+ if (c.container === undefined || c.container === window) {
+ var d = a(window).scrollLeft()
+ } else {
+ var d = a(c.container).offset().left
+ }
+ return d >= a(b).offset().left + c.threshold + a(b).width()
+ };
+ a.extend(a.expr[":"], {
+ "below-the-fold": "$.belowthefold(a, {threshold : 0, container: window})",
+ "above-the-fold": "!$.belowthefold(a, {threshold : 0, container: window})",
+ "right-of-fold": "$.rightoffold(a, {threshold : 0, container: window})",
+ "left-of-fold": "!$.rightoffold(a, {threshold : 0, container: window})"
+ })
+})(jQuery);
+
+/*jshint undef: true */
+/*global jQuery: true */
+
+/*
+ --------------------------------
+ Infinite Scroll
+ --------------------------------
+ + https://github.com/paulirish/infinite-scroll
+ + version 2.0b2.120519
+ + Copyright 2011/12 Paul Irish & Luke Shumard
+ + Licensed under the MIT license
+
+ + Documentation: http://infinite-scroll.com/
+*/
+
+(function (window, $, undefined) {
+ "use strict";
+
+ $.infinitescroll = function infscr(options, callback, element) {
+ this.element = $(element);
+
+ // Flag the object in the event of a failed creation
+ if (!this._create(options, callback)) {
+ this.failed = true;
+ }
+ };
+
+ $.infinitescroll.defaults = {
+ loading: {
+ finished: undefined,
+ finishedMsg: "<em>Congratulations, you've reached the edge of the timeline.</em>",
+ img: "img/square.gif",
+ msg: null,
+ msgText: "<em>Loading more tweets...</em>",
+ selector: null,
+ speed: 'fast',
+ start: undefined
+ },
+ state: {
+ isDuringAjax: false,
+ isInvalidPage: false,
+ isDestroyed: false,
+ isDone: false, // For when it goes all the way through the archive.
+ isPaused: false,
+ isBeyondMaxPage: false,
+ currPage: 1
+ },
+ debug: false,
+ behavior: undefined,
+ binder: $(window), // used to cache the selector
+ nextSelector: "div.navigation a:first",
+ navSelector: "div.navigation",
+ contentSelector: null, // rename to pageFragment
+ extraScrollPx: 150,
+ itemSelector: "div.post",
+ animate: false,
+ pathParse: undefined,
+ dataType: 'html',
+ appendCallback: true,
+ bufferPx: 40,
+ errorCallback: function () { },
+ infid: 0, //Instance ID
+ pixelsFromNavToBottom: undefined,
+ path: undefined, // Either parts of a URL as an array (e.g. ["/page/", "/"] or a function that takes in the page number and returns a URL
+ prefill: false, // When the document is smaller than the window, load data until the document is larger or links are exhausted
+ maxPage: undefined // to manually control maximum page (when maxPage is undefined, maximum page limitation is not work)
+ };
+
+ $.infinitescroll.prototype = {
+
+ /*
+ ----------------------------
+ Private methods
+ ----------------------------
+ */
+
+ // Bind or unbind from scroll
+ _binding: function infscr_binding(binding) {
+
+ var instance = this,
+ opts = instance.options;
+
+ opts.v = '2.0b2.120520';
+
+ // if behavior is defined and this function is extended, call that instead of default
+ if (!!opts.behavior && this['_binding_'+opts.behavior] !== undefined) {
+ this['_binding_'+opts.behavior].call(this);
+ return;
+ }
+
+ if (binding !== 'bind' && binding !== 'unbind') {
+ this._debug('Binding value ' + binding + ' not valid');
+ return false;
+ }
+
+ if (binding === 'unbind') {
+ (this.options.binder).unbind('smartscroll.infscr.' + instance.options.infid);
+ } else {
+ (this.options.binder)[binding]('smartscroll.infscr.' + instance.options.infid, function () {
+ instance.scroll();
+ });
+ }
+
+ this._debug('Binding', binding);
+ },
+
+ // Fundamental aspects of the plugin are initialized
+ _create: function infscr_create(options, callback) {
+
+ // Add custom options to defaults
+ var opts = $.extend(true, {}, $.infinitescroll.defaults, options);
+ this.options = opts;
+ var $window = $(window);
+ var instance = this;
+
+ // Validate selectors
+ if (!instance._validate(options)) {
+ return false;
+ }
+
+ // Validate page fragment path
+ var path = $(opts.nextSelector).attr('href');
+ if (!path) {
+ this._debug('Navigation selector not found');
+ return false;
+ }
+
+ // Set the path to be a relative URL from root.
+ opts.path = opts.path || this._determinepath(path);
+
+ // contentSelector is 'page fragment' option for .load() / .ajax() calls
+ opts.contentSelector = opts.contentSelector || this.element;
+
+ // loading.selector - if we want to place the load message in a specific selector, defaulted to the contentSelector
+ opts.loading.selector = opts.loading.selector || opts.contentSelector;
+
+ // Define loading.msg
+ opts.loading.msg = opts.loading.msg || $('<div id="infscr-loading"><img alt="Loading..." src="' + opts.loading.img + '" /><div>' + opts.loading.msgText + '</div></div>');
+
+ // Preload loading.img
+ (new Image()).src = opts.loading.img;
+
+ // distance from nav links to bottom
+ // computed as: height of the document + top offset of container - top offset of nav link
+ if(opts.pixelsFromNavToBottom === undefined) {
+ opts.pixelsFromNavToBottom = $(document).height() - $(opts.navSelector).offset().top;
+ this._debug("pixelsFromNavToBottom: " + opts.pixelsFromNavToBottom);
+ }
+
+ var self = this;
+
+ // determine loading.start actions
+ opts.loading.start = opts.loading.start || function() {
+ $(opts.navSelector).hide();
+ opts.loading.msg
+ .appendTo(opts.loading.selector)
+ .show(opts.loading.speed, $.proxy(function() {
+ this.beginAjax(opts);
+ }, self));
+ };
+
+ // determine loading.finished actions
+ opts.loading.finished = opts.loading.finished || function() {
+ if (!opts.state.isBeyondMaxPage)
+ opts.loading.msg.fadeOut(opts.loading.speed);
+ };
+
+ // callback loading
+ opts.callback = function(instance, data, url) {
+ if (!!opts.behavior && instance['_callback_'+opts.behavior] !== undefined) {
+ instance['_callback_'+opts.behavior].call($(opts.contentSelector)[0], data, url);
+ }
+
+ if (callback) {
+ callback.call($(opts.contentSelector)[0], data, opts, url);
+ }
+
+ if (opts.prefill) {
+ $window.bind("resize.infinite-scroll", instance._prefill);
+ }
+ };
+
+ if (options.debug) {
+ // Tell IE9 to use its built-in console
+ if (Function.prototype.bind && (typeof console === 'object' || typeof console === 'function') && typeof console.log === "object") {
+ ["log","info","warn","error","assert","dir","clear","profile","profileEnd"]
+ .forEach(function (method) {
+ console[method] = this.call(console[method], console);
+ }, Function.prototype.bind);
+ }
+ }
+
+ this._setup();
+
+ // Setups the prefill method for use
+ if (opts.prefill) {
+ this._prefill();
+ }
+
+ // Return true to indicate successful creation
+ return true;
+ },
+
+ _prefill: function infscr_prefill() {
+ var instance = this;
+ var $window = $(window);
+
+ function needsPrefill() {
+ return (instance.options.contentSelector.height() <= $window.height());
+ }
+
+ this._prefill = function() {
+ if (needsPrefill()) {
+ instance.scroll();
+ }
+
+ $window.bind("resize.infinite-scroll", function() {
+ if (needsPrefill()) {
+ $window.unbind("resize.infinite-scroll");
+ instance.scroll();
+ }
+ });
+ };
+
+ // Call self after setting up the new function
+ this._prefill();
+ },
+
+ // Console log wrapper
+ _debug: function infscr_debug() {
+ if (true !== this.options.debug) {
+ return;
+ }
+
+ if (typeof console !== 'undefined' && typeof console.log === 'function') {
+ // Modern browsers
+ // Single argument, which is a string
+ if ((Array.prototype.slice.call(arguments)).length === 1 && typeof Array.prototype.slice.call(arguments)[0] === 'string') {
+ console.log( (Array.prototype.slice.call(arguments)).toString() );
+ } else {
+ console.log( Array.prototype.slice.call(arguments) );
+ }
+ } else if (!Function.prototype.bind && typeof console !== 'undefined' && typeof console.log === 'object') {
+ // IE8
+ Function.prototype.call.call(console.log, console, Array.prototype.slice.call(arguments));
+ }
+ },
+
+ // find the number to increment in the path.
+ _determinepath: function infscr_determinepath(path) {
+
+ var opts = this.options;
+
+ // if behavior is defined and this function is extended, call that instead of default
+ if (!!opts.behavior && this['_determinepath_'+opts.behavior] !== undefined) {
+ return this['_determinepath_'+opts.behavior].call(this,path);
+ }
+
+ if (!!opts.pathParse) {
+
+ this._debug('pathParse manual');
+ return opts.pathParse(path, this.options.state.currPage+1);
+
+ } else if (path.match(/^(.*?)\b2\b(.*?$)/)) {
+ path = path.match(/^(.*?)\b2\b(.*?$)/).slice(1);
+
+ // if there is any 2 in the url at all.
+ } else if (path.match(/^(.*?)2(.*?$)/)) {
+
+ // page= is used in django:
+ // http://www.infinite-scroll.com/changelog/comment-page-1/#comment-127
+ if (path.match(/^(.*?page=)2(\/.*|$)/)) {
+ path = path.match(/^(.*?page=)2(\/.*|$)/).slice(1);
+ return path;
+ }
+
+ path = path.match(/^(.*?)2(.*?$)/).slice(1);
+
+ } else {
+
+ // page= is used in drupal too but second page is page=1 not page=2:
+ // thx Jerod Fritz, vladikoff
+ if (path.match(/^(.*?page=)1(\/.*|$)/)) {
+ path = path.match(/^(.*?page=)1(\/.*|$)/).slice(1);
+ return path;
+ } else {
+ this._debug('Sorry, we couldn\'t parse your Next (Previous Posts) URL. Verify your the css selector points to the correct A tag. If you still get this error: yell, scream, and kindly ask for help at infinite-scroll.com.');
+ // Get rid of isInvalidPage to allow permalink to state
+ opts.state.isInvalidPage = true; //prevent it from running on this page.
+ }
+ }
+ this._debug('determinePath', path);
+ return path;
+
+ },
+
+ // Custom error
+ _error: function infscr_error(xhr) {
+
+ var opts = this.options;
+
+ // if behavior is defined and this function is extended, call that instead of default
+ if (!!opts.behavior && this['_error_'+opts.behavior] !== undefined) {
+ this['_error_'+opts.behavior].call(this,xhr);
+ return;
+ }
+
+ if (xhr !== 'destroy' && xhr !== 'end') {
+ xhr = 'unknown';
+ }
+
+ this._debug('Error', xhr);
+
+ if (xhr === 'end' || opts.state.isBeyondMaxPage) {
+ this._showdonemsg();
+ }
+
+ opts.state.isDone = true;
+ opts.state.currPage = 1; // if you need to go back to this instance
+ opts.state.isPaused = false;
+ opts.state.isBeyondMaxPage = false;
+ this._binding('unbind');
+
+ },
+
+ // Load Callback
+ _loadcallback: function infscr_loadcallback(box, data, url) {
+ var opts = this.options,
+ callback = this.options.callback, // GLOBAL OBJECT FOR CALLBACK
+ result = (opts.state.isDone) ? 'done' : (!opts.appendCallback) ? 'no-append' : 'append',
+ frag;
+
+ // if behavior is defined and this function is extended, call that instead of default
+ if (!!opts.behavior && this['_loadcallback_'+opts.behavior] !== undefined) {
+ this['_loadcallback_'+opts.behavior].call(this,box,data);
+ return;
+ }
+
+ switch (result) {
+ case 'done':
+ this._showdonemsg();
+ return false;
+
+ case 'no-append':
+ if (opts.dataType === 'html') {
+ data = '<div>' + data + '</div>';
+ data = $(data).find(opts.itemSelector);
+ }
+ break;
+
+ case 'append':
+ var children = box.children();
+ // if it didn't return anything
+ if (children.length === 0) {
+ return this._error('end');
+ }
+
+ // added by esmizzle 2012-01-26 - update the path to the link for the next set of elements
+ var nexturl = $(data).find(opts.nextSelector).attr('href');
+ this._debug('nexturl: '+ nexturl)
+ this.options.path[0] = nexturl;
+ this.options.path[1] = '#pathcomplete';
+
+ // use a documentFragment because it works when content is going into a table or UL
+ frag = document.createDocumentFragment();
+ while (box[0].firstChild) {
+ frag.appendChild(box[0].firstChild);
+ }
+
+ this._debug('contentSelector', $(opts.contentSelector)[0]);
+ $(opts.contentSelector)[0].appendChild(frag);
+ // previously, we would pass in the new DOM element as context for the callback
+ // however we're now using a documentfragment, which doesn't have parents or children,
+ // so the context is the contentContainer guy, and we pass in an array
+ // of the elements collected as the first argument.
+
+ data = children.get();
+ break;
+ }
+
+ // loadingEnd function
+ opts.loading.finished.call($(opts.contentSelector)[0],opts);
+
+ // smooth scroll to ease in the new content
+ if (opts.animate) {
+ var scrollTo = $(window).scrollTop() + $(opts.loading.msg).height() + opts.extraScrollPx + 'px';
+ $('html,body').animate({ scrollTop: scrollTo }, 800, function () { opts.state.isDuringAjax = false; });
+ }
+
+ if (!opts.animate) {
+ // once the call is done, we can allow it again.
+ opts.state.isDuringAjax = false;
+ }
+
+ callback(this, data, url);
+
+ if (opts.prefill) {
+ this._prefill();
+ }
+ },
+
+ _nearbottom: function infscr_nearbottom() {
+
+ var opts = this.options,
+ pixelsFromWindowBottomToBottom = 0 + $(document).height() - (opts.binder.scrollTop()) - $(window).height();
+
+ // if behavior is defined and this function is extended, call that instead of default
+ if (!!opts.behavior && this['_nearbottom_'+opts.behavior] !== undefined) {
+ return this['_nearbottom_'+opts.behavior].call(this);
+ }
+
+ this._debug('math:', pixelsFromWindowBottomToBottom, opts.pixelsFromNavToBottom);
+
+ // if distance remaining in the scroll (including buffer) is less than the orignal nav to bottom....
+ return (pixelsFromWindowBottomToBottom - opts.bufferPx < opts.pixelsFromNavToBottom);
+
+ },
+
+ // Pause / temporarily disable plugin from firing
+ _pausing: function infscr_pausing(pause) {
+
+ var opts = this.options;
+
+ // if behavior is defined and this function is extended, call that instead of default
+ if (!!opts.behavior && this['_pausing_'+opts.behavior] !== undefined) {
+ this['_pausing_'+opts.behavior].call(this,pause);
+ return;
+ }
+
+ // If pause is not 'pause' or 'resume', toggle it's value
+ if (pause !== 'pause' && pause !== 'resume' && pause !== null) {
+ this._debug('Invalid argument. Toggling pause value instead');
+ }
+
+ pause = (pause && (pause === 'pause' || pause === 'resume')) ? pause : 'toggle';
+
+ switch (pause) {
+ case 'pause':
+ opts.state.isPaused = true;
+ break;
+
+ case 'resume':
+ opts.state.isPaused = false;
+ break;
+
+ case 'toggle':
+ opts.state.isPaused = !opts.state.isPaused;
+ break;
+ }
+
+ this._debug('Paused', opts.state.isPaused);
+ return false;
+
+ },
+
+ // Behavior is determined
+ // If the behavior option is undefined, it will set to default and bind to scroll
+ _setup: function infscr_setup() {
+
+ var opts = this.options;
+
+ // if behavior is defined and this function is extended, call that instead of default
+ if (!!opts.behavior && this['_setup_'+opts.behavior] !== undefined) {
+ this['_setup_'+opts.behavior].call(this);
+ return;
+ }
+
+ this._binding('bind');
+
+ return false;
+
+ },
+
+ // Show done message
+ _showdonemsg: function infscr_showdonemsg() {
+
+ var opts = this.options;
+
+ // if behavior is defined and this function is extended, call that instead of default
+ if (!!opts.behavior && this['_showdonemsg_'+opts.behavior] !== undefined) {
+ this['_showdonemsg_'+opts.behavior].call(this);
+ return;
+ }
+
+ opts.loading.msg
+ .find('img')
+ .hide()
+ .parent()
+ .find('div').html(opts.loading.finishedMsg).animate({ opacity: 1 }, 2000, function () {
+ $(this).parent().fadeOut(opts.loading.speed);
+ });
+
+ // user provided callback when done
+ opts.errorCallback.call($(opts.contentSelector)[0],'done');
+ },
+
+ // grab each selector option and see if any fail
+ _validate: function infscr_validate(opts) {
+ for (var key in opts) {
+ if (key.indexOf && key.indexOf('Selector') > -1 && $(opts[key]).length === 0) {
+ this._debug('Your ' + key + ' found no elements.');
+ return false;
+ }
+ }
+
+ return true;
+ },
+
+ /*
+ ----------------------------
+ Public methods
+ ----------------------------
+ */
+
+ // Bind to scroll
+ bind: function infscr_bind() {
+ this._binding('bind');
+ },
+
+ // Destroy current instance of plugin
+ destroy: function infscr_destroy() {
+ this.options.state.isDestroyed = true;
+ this.options.loading.finished();
+ return this._error('destroy');
+ },
+
+ // Set pause value to false
+ pause: function infscr_pause() {
+ this._pausing('pause');
+ },
+
+ // Set pause value to false
+ resume: function infscr_resume() {
+ this._pausing('resume');
+ },
+
+ beginAjax: function infscr_ajax(opts) {
+ var instance = this,
+ path = opts.path,
+ box, desturl, method, condition;
+
+ // increment the URL bit. e.g. /page/3/
+ opts.state.currPage++;
+
+ // Manually control maximum page
+ if ( opts.maxPage != undefined && opts.state.currPage > opts.maxPage ){
+ opts.state.isBeyondMaxPage = true;
+ this.destroy();
+ return;
+ }
+
+ // if we're dealing with a table we can't use DIVs
+ box = $(opts.contentSelector).is('table, tbody') ? $('<tbody/>') : $('<div/>');
+
+ desturl = (path[1] == '#pathcomplete') ? path[0] : path.join(opts.state.currPage); // only throw the currPage in there if we need it
+ instance._debug('desturl: '+desturl);
+ instance._debug('heading into ajax', desturl);
+
+ method = (opts.dataType === 'html' || opts.dataType === 'json' ) ? opts.dataType : 'html+callback';
+ if (opts.appendCallback && opts.dataType === 'html') {
+ method += '+callback';
+ }
+
+ switch (method) {
+ case 'html+callback':
+ instance._debug('Using HTML via .load() method');
+ box.load(desturl + ' ' + opts.itemSelector, undefined, function infscr_ajax_callback(responseText) {
+ instance._loadcallback(box, responseText, desturl);
+ });
+
+ break;
+
+ case 'html':
+ instance._debug('Using ' + (method.toUpperCase()) + ' via $.ajax() method');
+ $.ajax({
+ // params
+ url: desturl,
+ dataType: opts.dataType,
+ complete: function infscr_ajax_callback(jqXHR, textStatus) {
+ condition = (typeof (jqXHR.isResolved) !== 'undefined') ? (jqXHR.isResolved()) : (textStatus === "success" || textStatus === "notmodified");
+ if (condition) {
+ instance._loadcallback(box, jqXHR.responseText, desturl);
+ } else {
+ instance._error('end');
+ }
+ }
+ });
+
+ break;
+ case 'json':
+ instance._debug('Using ' + (method.toUpperCase()) + ' via $.ajax() method');
+ $.ajax({
+ dataType: 'json',
+ type: 'GET',
+ url: desturl,
+ success: function (data, textStatus, jqXHR) {
+ condition = (typeof (jqXHR.isResolved) !== 'undefined') ? (jqXHR.isResolved()) : (textStatus === "success" || textStatus === "notmodified");
+ if (opts.appendCallback) {
+ // if appendCallback is true, you must defined template in options.
+ // note that data passed into _loadcallback is already an html (after processed in opts.template(data)).
+ if (opts.template !== undefined) {
+ var theData = opts.template(data);
+ box.append(theData);
+ if (condition) {
+ instance._loadcallback(box, theData);
+ } else {
+ instance._error('end');
+ }
+ } else {
+ instance._debug("template must be defined.");
+ instance._error('end');
+ }
+ } else {
+ // if appendCallback is false, we will pass in the JSON object. you should handle it yourself in your callback.
+ if (condition) {
+ instance._loadcallback(box, data, desturl);
+ } else {
+ instance._error('end');
+ }
+ }
+ },
+ error: function() {
+ instance._debug("JSON ajax request failed.");
+ instance._error('end');
+ }
+ });
+
+ break;
+ }
+ },
+
+ // Retrieve next set of content items
+ retrieve: function infscr_retrieve(pageNum) {
+ pageNum = pageNum || null;
+
+ var instance = this,
+ opts = instance.options;
+
+ // if behavior is defined and this function is extended, call that instead of default
+ if (!!opts.behavior && this['retrieve_'+opts.behavior] !== undefined) {
+ this['retrieve_'+opts.behavior].call(this,pageNum);
+ return;
+ }
+
+ // for manual triggers, if destroyed, get out of here
+ if (opts.state.isDestroyed) {
+ this._debug('Instance is destroyed');
+ return false;
+ }
+
+ // we dont want to fire the ajax multiple times
+ opts.state.isDuringAjax = true;
+
+ opts.loading.start.call($(opts.contentSelector)[0],opts);
+ },
+
+ // Check to see next page is needed
+ scroll: function infscr_scroll() {
+
+ var opts = this.options,
+ state = opts.state;
+
+ // if behavior is defined and this function is extended, call that instead of default
+ if (!!opts.behavior && this['scroll_'+opts.behavior] !== undefined) {
+ this['scroll_'+opts.behavior].call(this);
+ return;
+ }
+
+ if (state.isDuringAjax || state.isInvalidPage || state.isDone || state.isDestroyed || state.isPaused) {
+ return;
+ }
+
+ if (!this._nearbottom()) {
+ return;
+ }
+
+ this.retrieve();
+
+ },
+
+ // Toggle pause value
+ toggle: function infscr_toggle() {
+ this._pausing();
+ },
+
+ // Unbind from scroll
+ unbind: function infscr_unbind() {
+ this._binding('unbind');
+ },
+
+ // update options
+ update: function infscr_options(key) {
+ if ($.isPlainObject(key)) {
+ this.options = $.extend(true,this.options,key);
+ }
+ }
+ };
+
+
+ /*
+ ----------------------------
+ Infinite Scroll function
+ ----------------------------
+
+ Borrowed logic from the following...
+
+ jQuery UI
+ - https://github.com/jquery/jquery-ui/blob/master/ui/jquery.ui.widget.js
+
+ jCarousel
+ - https://github.com/jsor/jcarousel/blob/master/lib/jquery.jcarousel.js
+
+ Masonry
+ - https://github.com/desandro/masonry/blob/master/jquery.masonry.js
+
+*/
+
+ $.fn.infinitescroll = function infscr_init(options, callback) {
+
+
+ var thisCall = typeof options;
+
+ switch (thisCall) {
+
+ // method
+ case 'string':
+ var args = Array.prototype.slice.call(arguments, 1);
+
+ this.each(function () {
+ var instance = $.data(this, 'infinitescroll');
+
+ if (!instance) {
+ // not setup yet
+ // return $.error('Method ' + options + ' cannot be called until Infinite Scroll is setup');
+ return false;
+ }
+
+ if (!$.isFunction(instance[options]) || options.charAt(0) === "_") {
+ // return $.error('No such method ' + options + ' for Infinite Scroll');
+ return false;
+ }
+
+ // no errors!
+ instance[options].apply(instance, args);
+ });
+
+ break;
+
+ // creation
+ case 'object':
+
+ this.each(function () {
+
+ var instance = $.data(this, 'infinitescroll');
+
+ if (instance) {
+
+ // update options of current instance
+ instance.update(options);
+
+ } else {
+
+ // initialize new instance
+ instance = new $.infinitescroll(options, callback, this);
+
+ // don't attach if instantiation failed
+ if (!instance.failed) {
+ $.data(this, 'infinitescroll', instance);
+ }
+
+ }
+
+ });
+
+ break;
+
+ }
+
+ return this;
+ };
+
+
+
+ /*
+ * smartscroll: debounced scroll event for jQuery *
+ * https://github.com/lukeshumard/smartscroll
+ * Based on smartresize by @louis_remi: https://github.com/lrbabe/jquery.smartresize.js *
+ * Copyright 2011 Louis-Remi & Luke Shumard * Licensed under the MIT license. *
+ */
+
+ var event = $.event,
+ scrollTimeout;
+
+ event.special.smartscroll = {
+ setup: function () {
+ $(this).bind("scroll", event.special.smartscroll.handler);
+ },
+ teardown: function () {
+ $(this).unbind("scroll", event.special.smartscroll.handler);
+ },
+ handler: function (event, execAsap) {
+ // Save the context
+ var context = this,
+ args = arguments;
+
+ // set correct event type
+ event.type = "smartscroll";
+
+ if (scrollTimeout) { clearTimeout(scrollTimeout); }
+ scrollTimeout = setTimeout(function () {
+ $(context).trigger('smartscroll', args);
+ }, execAsap === "execAsap" ? 0 : 100);
+ }
+ };
+
+ $.fn.smartscroll = function (fn) {
+ return fn ? this.bind("smartscroll", fn) : this.trigger("smartscroll", ["execAsap"]);
+ };
+
+
+})(window, jQuery);
+
+//Autocomplete
+(function (a) {
+ a.fn.extend({
+ autocomplete: function (b, c) {
+ var d = typeof b == "string";
+ c = a.extend({}, a.Autocompleter.defaults, {
+ url: d ? b : null,
+ data: d ? null : b,
+ delay: d ? a.Autocompleter.defaults.delay : 10,
+ max: c && !c.scroll ? 10 : 150
+ }, c);
+ c.highlight = c.highlight || function (a) {
+ return a
+ };
+ c.formatMatch = c.formatMatch || c.formatItem;
+ return this.each(function () {
+ new a.Autocompleter(this, c)
+ })
+ },
+ result: function (a) {
+ return this.bind("result", a)
+ },
+ search: function (a) {
+ return this.trigger("search", [a])
+ },
+ flushCache: function () {
+ return this.trigger("flushCache")
+ },
+ setOptions: function (a) {
+ return this.trigger("setOptions", [a])
+ },
+ unautocomplete: function () {
+ return this.trigger("unautocomplete")
+ }
+ });
+ a.Autocompleter = function (b, c) {
+ function x() {
+ e.removeClass(c.loadingClass)
+ }
+
+ function w(b) {
+ var d = [];
+ var e = b.split("\n");
+ for (var f = 0; f < e.length; f++) {
+ var g = a.trim(e[f]);
+ if (g) {
+ g = g.split("|");
+ d[d.length] = {
+ data: g,
+ value: g[0],
+ result: c.formatResult && c.formatResult(g, g[0]) || g[0]
+ }
+ }
+ }
+ return d
+ }
+
+ function v(d, e, f) {
+ if (!c.matchCase) d = d.toLowerCase();
+ var g = h.load(d);
+ if (g && g.length) {
+ e(d, g)
+ } else if (typeof c.url == "string" && c.url.length > 0) {
+ var i = {
+ timestamp: +(new Date)
+ };
+ a.each(c.extraParams, function (a, b) {
+ i[a] = typeof b == "function" ? b() : b
+ });
+ a.ajax({
+ mode: "abort",
+ port: "autocomplete" + b.name,
+ dataType: c.dataType,
+ url: c.url,
+ data: a.extend({
+ q: q(d),
+ limit: c.max
+ }, i),
+ success: function (a) {
+ var b = c.parse && c.parse(a) || w(a);
+ h.add(d, b);
+ e(d, b)
+ }
+ })
+ } else {
+ l.emptyList();
+ f(d)
+ }
+ }
+
+ function u(a, b) {
+ if (b && b.length && i) {
+ x();
+ l.display(b, a);
+ r(a, b[0].value);
+ l.show()
+ } else {
+ t()
+ }
+ }
+
+ function t() {
+ var d = l.visible();
+ l.hide();
+ clearTimeout(f);
+ x();
+ if (c.mustMatch) {
+ e.search(function (a) {
+ if (!a) {
+ if (c.multiple) {
+ var b = p(e.val()).slice(0, -1);
+ e.val(b.join(c.multipleSeparator) + (b.length ? c.multipleSeparator : ""))
+ } else e.val("")
+ }
+ })
+ }
+ if (d) a.Autocompleter.Selection(b, b.value.length, b.value.length)
+ }
+
+ function s() {
+ clearTimeout(f);
+ f = setTimeout(t, 200)
+ }
+
+ function r(f, h) {
+ if (c.autoFill && q(e.val()).toLowerCase() == f.toLowerCase() && j != d.BACKSPACE) {
+ e.val(e.val() + h.substring(q(g).length));
+ a.Autocompleter.Selection(b, g.length, g.length + h.length)
+ }
+ }
+
+ function q(a) {
+ if (!c.multiple) return a;
+ var b = p(a);
+ return b[b.length - 1]
+ }
+
+ function p(b) {
+ if (!b) {
+ return [""]
+ }
+ var d = b.split(c.multipleSeparator);
+ var e = [];
+ a.each(d, function (b, c) {
+ if (a.trim(c)) e[b] = a.trim(c)
+ });
+ return e
+ }
+
+ function o(a, b) {
+ if (j == d.DEL) {
+ l.hide();
+ return
+ }
+ var f = e.val();
+ if (!b && f == g) return;
+ g = f;
+ f = q(f);
+ if (f.length >= c.minChars) {
+ e.addClass(c.loadingClass);
+ if (!c.matchCase) f = f.toLowerCase();
+ v(f, u, t)
+ } else {
+ x();
+ l.hide()
+ }
+ }
+
+ function n() {
+ var a = l.selected();
+ if (!a) return false;
+ var b = a.result;
+ g = b;
+ if (c.multiple) {
+ var d = p(e.val());
+ if (d.length > 1) {
+ b = d.slice(0, d.length - 1).join(c.multipleSeparator) + c.multipleSeparator + b
+ }
+ b += c.multipleSeparator
+ }
+ e.val(b);
+ t();
+ e.trigger("result", [a.data, a.value]);
+ return true
+ }
+ var d = {
+ UP: 38,
+ DOWN: 40,
+ DEL: 46,
+ TAB: 9,
+ RETURN: 13,
+ ESC: 27,
+ COMMA: 188,
+ PAGEUP: 33,
+ PAGEDOWN: 34,
+ BACKSPACE: 8
+ };
+ var e = a(b).attr("autocomplete", "off").addClass(c.inputClass);
+ var f;
+ var g = "";
+ var h = a.Autocompleter.Cache(c);
+ var i = 0;
+ var j;
+ var k = {
+ mouseDownOnSelect: false
+ };
+ var l = a.Autocompleter.Select(c, b, n, k);
+ var m;
+ a(b.form).bind("submit.autocomplete", function () {
+ if (m) {
+ m = false;
+ return false
+ }
+ });
+ e.bind("input.autocomplete", function (b) {
+ j = b.keyCode;
+ switch (b.keyCode) {
+ case d.UP:
+ b.preventDefault();
+ if (l.visible()) {
+ l.prev()
+ } else {
+ o(0, true)
+ }
+ break;
+ case d.DOWN:
+ b.preventDefault();
+ if (l.visible()) {
+ l.next()
+ } else {
+ o(0, true)
+ }
+ break;
+ case d.PAGEUP:
+ b.preventDefault();
+ if (l.visible()) {
+ l.pageUp()
+ } else {
+ o(0, true)
+ }
+ break;
+ case d.PAGEDOWN:
+ b.preventDefault();
+ if (l.visible()) {
+ l.pageDown()
+ } else {
+ o(0, true)
+ }
+ break;
+ case c.multiple && a.trim(c.multipleSeparator) == "," && d.COMMA:
+ case d.TAB:
+ case d.RETURN:
+ if (n()) {
+ b.preventDefault();
+ m = true;
+ return false
+ }
+ break;
+ case d.ESC:
+ l.hide();
+ break;
+ default:
+ clearTimeout(f);
+ f = setTimeout(o, c.delay);
+ break
+ }
+ }).focus(function () {
+ i++
+ }).blur(function () {
+ i = 0;
+ if (!k.mouseDownOnSelect) {
+ s()
+ }
+ }).click(function () {
+ if (i++ > 1 && !l.visible()) {
+ o(0, true)
+ }
+ }).bind("search", function () {
+ function c(a, c) {
+ var d;
+ if (c && c.length) {
+ for (var f = 0; f < c.length; f++) {
+ if (c[f].result.toLowerCase() == a.toLowerCase()) {
+ d = c[f];
+ break
+ }
+ }
+ }
+ if (typeof b == "function") b(d);
+ else e.trigger("result", d && [d.data, d.value])
+ }
+ var b = arguments.length > 1 ? arguments[1] : null;
+ a.each(p(e.val()), function (a, b) {
+ v(b, c, c)
+ })
+ }).bind("flushCache", function () {
+ h.flush()
+ }).bind("setOptions", function () {
+ a.extend(c, arguments[1]);
+ if ("data" in arguments[1]) h.populate()
+ }).bind("unautocomplete", function () {
+ l.unbind();
+ e.unbind();
+ a(b.form).unbind(".autocomplete")
+ });
+ };
+ a.Autocompleter.defaults = {
+ inputClass: "ac_input",
+ resultsClass: "ac_results",
+ loadingClass: "ac_loading",
+ minChars: 1,
+ delay: 400,
+ matchCase: false,
+ matchSubset: true,
+ matchContains: false,
+ cacheLength: 10,
+ max: 100,
+ mustMatch: false,
+ extraParams: {},
+ selectFirst: true,
+ formatItem: function (a) {
+ return a[0]
+ },
+ formatMatch: null,
+ autoFill: false,
+ width: 0,
+ multiple: false,
+ multipleSeparator: ", ",
+ highlight: function (a, b) {
+ return a.replace(new RegExp("(?![^&;]+;)(?!<[^<>]*)(" + b.replace(/([\^\$\(\)\[\]\{\}\*\.\+\?\|\\])/gi, "\\$1") + ")(?![^<>]*>)(?![^&;]+;)", "gi"), "<strong>$1</strong>")
+ },
+ scroll: true,
+ scrollHeight: 180
+ };
+ a.Autocompleter.Cache = function (b) {
+ function h() {
+ c = {};
+ d = 0
+ }
+
+ function g() {
+ if (!b.data) return false;
+ var c = {},
+ d = 0;
+ if (!b.url) b.cacheLength = 1;
+ c[""] = [];
+ for (var e = 0, g = b.data.length; e < g; e++) {
+ var h = b.data[e];
+ h = typeof h == "string" ? [h] : h;
+ var i = b.formatMatch(h, e + 1, b.data.length);
+ if (i === false) continue;
+ var j = i.charAt(0).toLowerCase();
+ if (!c[j]) c[j] = [];
+ var k = {
+ value: i,
+ data: h,
+ result: b.formatResult && b.formatResult(h) || i
+ };
+ c[j].push(k);
+ if (d++ < b.max) {
+ c[""].push(k)
+ }
+ }
+ a.each(c, function (a, c) {
+ b.cacheLength++;
+ f(a, c)
+ })
+ }
+
+ function f(a, e) {
+ if (d > b.cacheLength) {
+ h()
+ }
+ if (!c[a]) {
+ d++
+ }
+ c[a] = e
+ }
+
+ function e(a, c) {
+ if (!b.matchCase) a = a.toLowerCase();
+ var d = a.indexOf(c);
+ if (b.matchContains == "word") {
+ d = a.toLowerCase().search("\\b" + c.toLowerCase())
+ }
+ if (d == -1) return false;
+ return d == 0 || b.matchContains
+ }
+ var c = {};
+ var d = 0;
+ setTimeout(g, 25);
+ return {
+ flush: h,
+ add: f,
+ populate: g,
+ load: function (f) {
+ if (!b.cacheLength || !d) return null;
+ if (!b.url && b.matchContains) {
+ var g = [];
+ for (var h in c) {
+ if (h.length > 0) {
+ var i = c[h];
+ a.each(i, function (a, b) {
+ if (e(b.value, f)) {
+ g.push(b)
+ }
+ })
+ }
+ }
+ return g
+ } else if (c[f]) {
+ return c[f]
+ } else if (b.matchSubset) {
+ for (var j = f.length - 1; j >= b.minChars; j--) {
+ var i = c[f.substr(0, j)];
+ if (i) {
+ var g = [];
+ a.each(i, function (a, b) {
+ if (e(b.value, f)) {
+ g[g.length] = b
+ }
+ });
+ return g
+ }
+ }
+ }
+ return null
+ }
+ }
+ };
+ a.Autocompleter.Select = function (b, c, d, e) {
+ function s() {
+ m.empty();
+ var c = r(i.length);
+ for (var d = 0; d < c; d++) {
+ if (!i[d]) continue;
+ var e = b.formatItem(i[d].data, d + 1, c, i[d].value, j);
+ if (e === false) continue;
+ var k = a("<li/>").html(b.highlight(e, j)).addClass(d % 2 == 0 ? "ac_even" : "ac_odd").appendTo(m)[0];
+ a.data(k, "ac_data", i[d])
+ }
+ g = m.find("li");
+ if (b.selectFirst) {
+ g.slice(0, 1).addClass(f.ACTIVE);
+ h = 0
+ }
+ if (a.fn.bgiframe) m.bgiframe()
+ }
+
+ function r(a) {
+ return b.max && b.max < a ? b.max : a
+ }
+
+ function q(a) {
+ h += a;
+ if (h < 0) {
+ h = g.size() - 1
+ } else if (h >= g.size()) {
+ h = 0
+ }
+ }
+
+ function p(a) {
+ g.slice(h, h + 1).removeClass(f.ACTIVE);
+ q(a);
+ var c = g.slice(h, h + 1).addClass(f.ACTIVE);
+ if (b.scroll) {
+ var d = 0;
+ g.slice(0, h).each(function () {
+ d += this.offsetHeight
+ });
+ if (d + c[0].offsetHeight - m.scrollTop() > m[0].clientHeight) {
+ m.scrollTop(d + c[0].offsetHeight - m.innerHeight())
+ } else if (d < m.scrollTop()) {
+ m.scrollTop(d)
+ }
+ }
+ }
+
+ function o(a) {
+ var b = a.target;
+ while (b && b.tagName != "LI") b = b.parentNode;
+ if (!b) return [];
+ return b
+ }
+
+ function n() {
+ if (!k) return;
+ l = a("<div/>").hide().addClass(b.resultsClass).css("position", "absolute").appendTo(document.body);
+ m = a("<ul/>").appendTo(l).mouseover(function (b) {
+ if (o(b).nodeName && o(b).nodeName.toUpperCase() == "LI") {
+ h = a("li", m).removeClass(f.ACTIVE).index(o(b));
+ a(o(b)).addClass(f.ACTIVE)
+ }
+ }).click(function (b) {
+ b.preventDefault();
+ a(o(b)).addClass(f.ACTIVE);
+ d();
+ c.focus()
+ }).mousedown(function () {
+ e.mouseDownOnSelect = true
+ }).mouseup(function () {
+ e.mouseDownOnSelect = false
+ });
+ if (b.width > 0) l.css("width", b.width);
+ k = false
+ }
+ var f = {
+ ACTIVE: "ac_over"
+ };
+ var g, h = -1,
+ i, j = "",
+ k = true,
+ l, m;
+ return {
+ display: function (a, b) {
+ n();
+ i = a;
+ j = b;
+ s()
+ },
+ next: function () {
+ p(1)
+ },
+ prev: function () {
+ p(-1)
+ },
+ pageUp: function () {
+ if (h != 0 && h - 8 < 0) {
+ p(-h)
+ } else {
+ p(-8)
+ }
+ },
+ pageDown: function () {
+ if (h != g.size() - 1 && h + 8 > g.size()) {
+ p(g.size() - 1 - h)
+ } else {
+ p(8)
+ }
+ },
+ hide: function () {
+ l && l.hide();
+ g && g.removeClass(f.ACTIVE);
+ h = -1
+ },
+ visible: function () {
+ return l && l.is(":visible")
+ },
+ current: function () {
+ return this.visible() && (g.filter("." + f.ACTIVE)[0] || b.selectFirst && g[0])
+ },
+ show: function () {
+ var d = a(c).offset();
+ l.css({
+ width: typeof b.width == "string" || b.width > 0 ? b.width : a(c).width(),
+ top: d.top + c.offsetHeight,
+ left: d.left
+ }).show();
+ if (b.scroll) {
+ m.scrollTop(0);
+ m.css({
+ maxHeight: b.scrollHeight,
+ overflow: "auto"
+ });
+ }
+ },
+ selected: function () {
+ var b = g && g.filter("." + f.ACTIVE).removeClass(f.ACTIVE);
+ return b && b.length && a.data(b[0], "ac_data")
+ },
+ emptyList: function () {
+ m && m.empty()
+ },
+ unbind: function () {
+ l && l.remove()
+ }
+ }
+ };
+ a.Autocompleter.Selection = function (a, b, c) {
+ if (a.createTextRange) {
+ var d = a.createTextRange();
+ d.collapse(true);
+ d.moveStart("character", b);
+ d.moveEnd("character", c);
+ d.select()
+ } else if (a.setSelectionRange) {
+ a.setSelectionRange(b, c)
+ } else {
+ if (a.selectionStart) {
+ a.selectionStart = b;
+ a.selectionEnd = c
+ }
+ }
+ a.focus()
+ }
+})(jQuery);
+
+//Timeago
+(function (a) {
+ function f(a) {
+ return (new Date).getTime() - a.getTime()
+ }
+
+ function e(a) {
+ return b.inWords(f(a))
+ }
+
+ function d(b) {
+ b = a(b);
+ var c = a.trim(b.attr("id"));
+ if (!b.data("timeago")) {
+ b.data("timeago", {
+ datetime: new Date(c * 1e3)
+ })
+ }
+ return b.data("timeago")
+ }
+
+ function c() {
+ var b = d(this);
+ if (!isNaN(b.datetime)) {
+ a(this).text(e(b.datetime))
+ }
+ return this
+ }
+ a.timeago = function (a) {
+ if (a instanceof Date) {
+ return e(a)
+ }
+ };
+ var b = a.timeago;
+ a.extend(a.timeago, {
+ settings: {
+ refreshMillis: 6e4,
+ allowFuture: false,
+ strings: {
+ prefixAgo: null,
+ prefixFromNow: null,
+ suffixAgo: "ago",
+ suffixFromNow: "from now",
+ seconds: "%d seconds",
+ minute: "about a minute",
+ minutes: "%d minutes",
+ hour: "about an hour",
+ hours: "about %d hours",
+ day: "a day",
+ days: "%d days",
+ month: "about a month",
+ months: "%d months",
+ year: "about a year",
+ years: "%d years",
+ numbers: []
+ }
+ },
+ inWords: function (b) {
+ function k(d, e) {
+ var f = a.isFunction(d) ? d(e, b) : d;
+ var g = c.numbers && c.numbers[e] || e;
+ return f.replace(/%d/i, g)
+ }
+ var c = this.settings.strings;
+ var d = c.prefixAgo;
+ var e = c.suffixAgo;
+ if (this.settings.allowFuture) {
+ if (b < 0) {
+ d = c.prefixFromNow;
+ e = c.suffixFromNow
+ }
+ b = Math.abs(b)
+ }
+ var f = b / 1e3;
+ var g = f / 60;
+ var h = g / 60;
+ var i = h / 24;
+ var j = i / 365;
+ var l = f < 45 && k(c.seconds, Math.round(f)) || f < 90 && k(c.minute, 1) || g < 45 && k(c.minutes, Math.round(g)) || g < 90 && k(c.hour, 1) || h < 24 && k(c.hours, Math.round(h)) || h < 48 && k(c.day, 1) || i < 30 && k(c.days, Math.floor(i)) || i < 60 && k(c.month, 1) || i < 365 && k(c.months, Math.floor(i / 30)) || j < 2 && k(c.year, 1) || k(c.years, Math.floor(j));
+ return a.trim([d, l, e].join(" "))
+ }
+ });
+ a.fn.timeago = function () {
+ var a = this;
+ a.each(c);
+ var d = b.settings;
+ if (d.refreshMillis > 0) {
+ setInterval(function () {
+ a.each(c)
+ }, d.refreshMillis)
+ }
+ return a
+ }
+})(jQuery);
+
+//caret
+(function (a) {
+ a.extend(a.fn, {
+ caret: function (a, b) {
+ var c = this[0];
+ if (c) {
+ if (typeof a == "undefined") {
+ if (c.selectionStart) {
+ a = c.selectionStart;
+ b = c.selectionEnd
+ } else if (document.selection) {
+ var d = this.val();
+ var e = document.selection.createRange().duplicate();
+ e.moveEnd("character", d.length);
+ a = e.text == "" ? d.length : d.lastIndexOf(e.text);
+ e = document.selection.createRange().duplicate();
+ e.moveStart("character", -d.length);
+ b = e.text.length
+ }
+ } else {
+ var d = this.val();
+ if (typeof a != "number") a = -1;
+ if (typeof b != "number") b = -1;
+ if (a < 0) a = 0;
+ if (b > d.length) b = d.length;
+ if (b < a) b = a;
+ if (a > b) a = b;
+ c.focus();
+ if (c.selectionStart) {
+ c.selectionStart = a;
+ c.selectionEnd = b
+ } else if (document.selection) {
+ var e = c.createTextRange();
+ e.collapse(true);
+ e.moveStart("character", a);
+ e.moveEnd("character", b - a);
+ e.select()
+ }
+ }
+ return {
+ start: a,
+ end: b
+ }
+ }
+ }
+ })
+})(jQuery);
+
+//ajaxFileupload
+jQuery.extend({
+ createUploadIframe: function (a, b) {
+ var c = "jUploadFrame" + a;
+ var d = '<iframe id="' + c + '" name="' + c + '" style="position:absolute; top:-9999px; left:-9999px"';
+ if (window.ActiveXObject) {
+ if (typeof b == "boolean") {
+ d += ' src="' + "javascript:false" + '"'
+ } else if (typeof b == "string") {
+ d += ' src="' + b + '"'
+ }
+ }
+ d += " />";
+ jQuery(d).appendTo(document.body);
+ return jQuery("#" + c).get(0)
+ },
+ createUploadForm: function (a, b, c) {
+ var d = "jUploadForm" + a;
+ var e = "jUploadFile" + a;
+ var f = jQuery('<form action="" method="POST" name="' + d + '" id="' + d + '" enctype="multipart/form-data"></form>');
+ if (c) {
+ for (var g in c) {
+ jQuery('<input type="hidden" name="' + g + '" value="' + c[g] + '" />').appendTo(f)
+ }
+ }
+ var h = jQuery("#" + b);
+ var i = jQuery(h).clone();
+ jQuery(h).attr("id", e);
+ jQuery(h).before(i);
+ jQuery(h).appendTo(f);
+ jQuery(f).css("position", "absolute");
+ jQuery(f).css("top", "-1200px");
+ jQuery(f).css("left", "-1200px");
+ jQuery(f).appendTo("body");
+ return f
+ },
+ ajaxFileUpload: function (a) {
+ a = jQuery.extend({}, jQuery.ajaxSettings, a);
+ var b = (new Date).getTime();
+ var c = jQuery.createUploadForm(b, a.fileElementId, typeof a.data == "undefined" ? false : a.data);
+ var d = jQuery.createUploadIframe(b, a.secureuri);
+ var e = "jUploadFrame" + b;
+ var f = "jUploadForm" + b;
+ if (a.global && !(jQuery.active++)) {
+ jQuery.event.trigger("ajaxStart")
+ }
+ var g = false;
+ var h = {};
+ if (a.global) jQuery.event.trigger("ajaxSend", [h, a]);
+ var i = function (b) {
+ var d = document.getElementById(e);
+ try {
+ if (d.contentWindow) {
+ h.responseText = d.contentWindow.document.body ? d.contentWindow.document.body.innerHTML : null;
+ h.responseXML = d.contentWindow.document.XMLDocument ? d.contentWindow.document.XMLDocument : d.contentWindow.document
+ } else if (d.contentDocument) {
+ h.responseText = d.contentDocument.document.body ? d.contentDocument.document.body.innerHTML : null;
+ h.responseXML = d.contentDocument.document.XMLDocument ? d.contentDocument.document.XMLDocument : d.contentDocument.document
+ }
+ } catch (f) {
+ jQuery.handleError(a, h, null, f)
+ }
+ if (h || b == "timeout") {
+ g = true;
+ var i;
+ try {
+ i = b != "timeout" ? "success" : "error";
+ if (i != "error") {
+ var j = jQuery.uploadHttpData(h, a.dataType);
+ if (a.success) a.success(j, i);
+ if (a.global) jQuery.event.trigger("ajaxSuccess", [h, a])
+ } else jQuery.handleError(a, h, i)
+ } catch (f) {
+ i = "error";
+ jQuery.handleError(a, h, i, f)
+ }
+ if (a.global) jQuery.event.trigger("ajaxComplete", [h, a]);
+ if (a.global && !--jQuery.active) jQuery.event.trigger("ajaxStop");
+ if (a.complete) a.complete(h, i);
+ jQuery(d).unbind();
+ setTimeout(function () {
+ try {
+ jQuery(d).remove();
+ jQuery(c).remove()
+ } catch (b) {
+ jQuery.handleError(a, h, null, b)
+ }
+ }, 100);
+ h = null
+ }
+ };
+ if (a.timeout > 0) {
+ setTimeout(function () {
+ if (!g) i("timeout")
+ }, a.timeout)
+ }
+ try {
+ var c = jQuery("#" + f);
+ jQuery(c).attr("action", a.url);
+ jQuery(c).attr("method", "POST");
+ jQuery(c).attr("target", e);
+ if (c.encoding) {
+ jQuery(c).attr("encoding", "multipart/form-data")
+ } else {
+ jQuery(c).attr("enctype", "multipart/form-data")
+ }
+ jQuery(c).submit()
+ } catch (j) {
+ jQuery.handleError(a, h, null, j)
+ }
+ jQuery("#" + e).load(i);
+ return {
+ abort: function () {}
+ }
+ },
+ uploadHttpData: function (r, type) {
+ var data = !type;
+ data = type == "xml" || data ? r.responseXML : r.responseText;
+ if (type == "script") jQuery.globalEval(data);
+ if (type == "json") eval("data = " + data);
+ if (type == "html") jQuery("<div>").html(data).evalScripts();
+ return data
+ }
+});
onRT($(this));
}
});
- $(".retw_btn").live("click", function(e){
+ $(document).on("click", ".retw_btn", function(e){
e.preventDefault();
onNwRT($(this));
});
- $(".rt_undo").live("click", function(e){
- e.preventDefault();
- onUndoRt($(this));
- });
- $(".replie_btn").live("click", function(e){
+ $(document).on("click", ".replie_btn", function(e){
e.preventDefault();
var replie_id = $(this).parent().parent().find(".status_word").find(".user_name").attr("id");
if ($("#textbox").length > 0) {
}
});
- $(".favor_btn").live("click", function(e){
+ $(document).on("click", ".favor_btn", function(e){
e.preventDefault();
onFavor($(this));
});
- $("#list_follow_btn").live("click", function(e){
+ $(document).on("click", "#list_follow_btn", function(e){
e.preventDefault();
var $this = $(this);
var id = $("#info_name").text();
});
- $("#list_block_btn").live("click", function(e){
+ $(document).on("click", "#list_block_btn", function(e){
e.preventDefault();
var $this = $(this);
var id = $("#info_name").text();
$(function(){
- $(".delete_btn").hide();
- $(".rank_list").find("li").live("mouseover", function(){
- $(this).find(".delete_btn").css("display", "inline-block");
- });
-
- $(".rank_list").find("li").live("mouseout", function(){
- $(this).find(".delete_btn").hide();
- });
-
$(".list_delete_btn").click(function(e){
e.preventDefault();
var $this = $(this);
$(function(){
- $(".rt_btn").live("click", function(e){
+ $(document).on("click", ".rt_btn", function(e){
e.preventDefault();
onRT($(this));
});
- $(".replie_btn").live("click", function(e){
+ $(document).on("click", ".replie_btn", function(e){
e.preventDefault();
onReplie($(this),e);
});
- $(".favor_btn").live("click", function(e){
+
+ $(document).on("click", ".favor_btn", function(e){
e.preventDefault();
onFavor($(this));
});
- $(".unfollow_list").live("click",function(e){
+
+ $(document).on("click", ".unfollow_list", function(e){
e.preventDefault();
var $this = $(this);
var id = $this.parent().parent().find(".rank_name").text().substr(1);
});
- $(".delete_list").live("click", function(e){
+ $(document).on("click", ".delete_list", function(e){
e.preventDefault();
var $this = $(this);
var list_slug = $this.parent().parent().find(".rank_name").text().split("/")[1];
}
});
- $("#list_create_btn").live("click", function(e){
+ $("#list_create_btn").click(function(e){
e.preventDefault();
$("#list_form").toggle("fast");
$("#list_name").focus().val("");
$("#list_submit").val("Create");
});
- $(".edit_list").live("click", function(e){
+ $(document).on("click", ".edit_list", function(e){
e.preventDefault();
var parent = $(this).parent().parent();
var list_name = parent.find(".rank_name").text().split("/")[1];
$("#pre_list_name").val(list_name);
})
- $("#list_submit").live("click", function(e){
+ $("#list_submit").click(function(e){
e.preventDefault();
var list_name = $("#list_name").val();
if (list_name.length == 0) {
html += '<div class="rank_content" id="'+msg.contentid+'"><span class="rank_num"><span class="rank_name">';
html +='<a href="list.php?id='+msg.listuri+'"><em>'+msg.username+'/</em>'+list_name+'</a>';
html += '</span></span><span class="rank_count">Followers: 0 Members: 0 '+(list_protect == "public" ? "Public" : "Private")+'</span>';
- html += '<span class="rank_description">Bio: '+list_description+'</span>';
- html += '<span id="list_action"><a id="btn" href="#" class="edit_list">Edit</a> <a id="btn" href="#" class="delete_list">Delete</a> <a id="btn" href="#" class="add_member">Add Members</a></span>';
+ if (list_description) html += '<span class="rank_description">Description: '+list_description+'</span>';
+ html += '<span id="list_action"><a href="#" class="edit_list btn">Edit</a> <a href="#" class="delete_list btn">Delete</a> <a href="#" class="add_member btn">Add Members</a></span>';
html += "</div></li>";
$(html).prependTo($(".rank_list")).fadeIn('fast');
}
});
});
- $(".add_member").live("click", function(e){
+ $(document).on("click", ".add_member", function(e){
e.preventDefault();
$("#member_form").remove();
var position = $(this).position();
function get_img_processor(type) {
switch (type) {
+ case "instagram.com":
+ proc = {
+ reg: /^http:\/\/(?:www\.)?instagram\.com\/([\w-\/]+)/,
+ func: function (url_key, url_elem) {
+ var src = "http://instagram.com/" + url_key[1] + "media/?size=m";
+ append_image(src, url_elem);
+ }
+ };
+ return proc;
case "instagr.am":
proc = {
- reg: /^http:\/\/(?:www\.)?instagr\.am\/([\w\/]+)/,
+ reg: /^http:\/\/(?:www\.)?instagr\.am\/([\w-\/]+)/,
func: function (url_key, url_elem) {
var src = "http://instagr.am/" + url_key[1] + "media/?size=m";
append_image(src, url_elem);
}
var previewMedia = function (objs) {
var temp =[];
- objs.find("span.tweet a[rel^=noref], span.tweet_url").each(function () {
+ objs.find("span.tweet a[rel^=noref], span.tweet_url, span.extended_entities a[rel^=noref]").each(function () {
var t = $(this);
var href = t.attr("href");
if(!(href in temp) && !t.data("previewed")) {
});
}
}
-GM_wait();
\ No newline at end of file
+GM_wait();
$("#sent_id").autocomplete(auto);
$("#allMessage").click(function(e) {
var $this = $(e.target);
- var type = $this.attr('class');
+ var matches = ($this.attr('class') || '').match(/\w+_btn/);
+ var type = matches ? matches[0] : '';
switch(type) {
case 'msg_replie_btn':
e.preventDefault();
function updateSentTip(message,duration,className){
var sentTip = $("#sentTip");
var bgColor = $("body").css("background-color");
- sentTip.html(message).removeClass().addClass(className)
- .css({
- "border-style": "solid",
- "border-width": "1px",
- "border-color": "transparent"
- }).slideDown("fast");
+ sentTip.html(message).removeClass().addClass("shown " + className);
setTimeout(function (){
- sentTip.slideUp('fast');
+ sentTip.removeClass();
},duration);
return sentTip;
};
if (sent_id){
leave -= sent_id.length+3;
}
+ if ($("#media_preview img[media_id]").length > 0) {
+ leave -= 23;
+ $("#photoBtn").addClass("func_enabled");
+ }
+ else {
+ $("#photoBtn").removeClass("func_enabled");
+ }
+ $tb.text(leave);
if (leave < 0){
- $tb.text(leave).css("color","#C00");
$("#tweeting_button").addClass('btn-disabled');
}else{
- $tb.text(leave);
$("#tweeting_button").removeClass('btn-disabled');
- if (leave > 40){
- $tb.css("color","#CCC");
- }else if(leave > 20){
- $tb.css("color","#CAA");
- }else if(leave > 10){
- $tb.css("color","#C88");
- }else{
- $tb.css("color","#C44");
- }
+ }
+ if (leave > 40){
+ $tb.css("color","#CCC");
+ }else if(leave > 20){
+ $tb.css("color","#CAA");
+ }else if(leave > 10){
+ $tb.css("color","#C88");
+ }else if(leave >= 0){
+ $tb.css("color","#C44");
+ }else{
+ $tb.css("color","#C00");
}
if(leave === 140){
$("#in_reply_to").val("");
$("#tweeting_button").addClass('btn-disabled');
}
}
-var formHTML = '<span id="tip"><b>140</b></span><form action="index.php" method="post"><textarea name="status" id="textbox"></textarea><input type="hidden" id="in_reply_to" name="in_reply_to" value="0" /><div id="tweeting_controls"><a class="a-btn a-btn-m btn-disabled" id="tweeting_button" tabindex="2" href="#" title="Ctrl/⌘+Enter also works!"><span>Send</span></a></div></form>';
+var formHTML = '<span id="tip"><b>140</b></span><form><textarea name="status" id="textbox"></textarea><input type="hidden" id="in_reply_to" name="in_reply_to" value="0" /><div id="tweeting_controls"><a class="a-btn btn-disabled" id="tweeting_button" tabindex="2" href="#" title="Ctrl/⌘+Enter also works!"><span class="fa fa-send-o"></span></a></div></form>';
var embrTweet=function(objs){
if(typeof objs === 'undefined'){
leaveWord();
$(e.target).unbind('keydown');
if ((e.ctrlKey || e.metaKey) && e.which == 13){
- if (PAUSE_UPDATE !== true){
- updateStatus();
- }else{
- return 0;
- }
+ updateStatus();
}else{
if($.inArray(e.which,[91,93,224,17]) > -1){
$(e.target).keydown(function(e){
if(e.which == 13){
- if (PAUSE_UPDATE !== true){
- updateStatus();
- }else{
- return 0;
- }
+ updateStatus();
e.stopPropagation();
}
});
});
$("#tweeting_button").click(function (e){
e.preventDefault();
- if ($("#textbox").val().length >0 ){
- updateStatus();
- }
+ updateStatus();
});
};
- var updateStatus = function(){
- PAUSE_UPDATE = true;
+var updateStatus = function(){
+ if (PAUSE_UPDATE) return false;
var text = $("#textbox").val();
+ if ($.trim(text).length == 0 &&
+ $("#media_preview img[media_id]").length == 0)
+ return false;
var sent_id = $("#sent_id").val();
if(sent_id){
text = "D "+sent_id+' '+text;
$.cookie('recover',text,{'expire': 30});
if(window.confirm("Your tweet is longer than 140 words! truncated? (you can restore later using restore button.)")){
text = text.substr(0,137)+'...' ;
+ $("#textbox").val(text);
+ leaveWord();
}
- }
- if (wordsCount == 0 || $.trim(text).length == 0){
- updateSentTip("Your cannot send an empty tweet!",3e3,"failure");
return false;
- }else{
- $('#tip').addClass('loading').find('b').css('color','transparent');
- $.cookie('recover',text,{'expire': 30});
- $.ajax({
- url: "ajax/update.php",
- type: "POST",
- data:{
- "status": text,
- "in_reply_to": $("#in_reply_to").val()
- },
- success: function (msg){
- if ($.trim(msg).indexOf("</li>") > 0){
- $('#tip').removeClass('loading').find("b").text("140").show();
- if ( (text.substring(0,2)).toUpperCase() == "D "){ //exclude the DMs. the exam of user_name is omitted.
- updateSentTip("Your DM has been sent!",3e3,"success");
- $("#sent_id,#textbox").val("");
- leaveWord();
- }else{
- updateSentTip("Your status has been updated!",3e3,"success");
- $("#textbox").val("");
- leaveWord();
- if(typeof INTERVAL_COOKIE !== 'undefined'){
- var source = $(msg).prependTo($("#allTimeline"));
- source.hide().slideDown('fast');
- var statusid = $.trim($(msg).find('.status_id').text());
- var statusText = $.trim($(msg).find('.tweet').html());
- var statusDate = $.trim($(msg).find('span.date a').attr('id'));
- embrTweet(source);
- $(".mine").slideDown("fast");
- $("#full_status").fadeIn("fast");
- $("#currently .status-text").hide().text(limitation(text)).fadeIn("fast");
- $("#latest_meta").hide().html("<a target=\"_blank\" href=\"status.php?id="+statusid+"\" id=\""+statusDate+"\">less than 5 seconds ago</a>").fadeIn("fast");
- $("#currently .full-text").hide().html(statusText);
- $("#full_meta").hide().html("<a target=\"_blank\" href=\"status.php?id="+statusid+"\" id=\""+statusDate+"\">less than 5 seconds ago</a>");
- $("#full_meta a,.full-text a").click(function (e){e.stopPropagation();});
- previewMedia(source);
- freshProfile();
- }
- }
+ }
+ PAUSE_UPDATE = true;
+ var $mediaImgs = $("#media_preview img[media_id]");
+ var idArr = [];
+ var uploadMediaIds = null;
+ if ($mediaImgs.length > 0) {
+ $mediaImgs.each(function(i,n){
+ idArr.push(n.getAttribute("media_id"));
+ });
+ uploadMediaIds = idArr.join(',');
+ }
+ $('#tip span').show();
+ $('#tip b').hide();
+ $.cookie('recover',text,{'expire': 30});
+ $.ajax({
+ url: "ajax/update.php",
+ type: "POST",
+ data:{
+ "status": text,
+ "in_reply_to": $("#in_reply_to").val(),
+ "media_ids": uploadMediaIds
+ },
+ success: function (msg){
+ if ($.trim(msg).indexOf("</li>") > 0){
+ $('#tip span').hide();
+ $('#tip b').show();
+ if ( (text.substring(0,2)).toUpperCase() == "D "){ //exclude the DMs. the exam of user_name is omitted.
+ updateSentTip("Your DM has been sent!",3e3,"success");
+ $("#sent_id,#textbox").val("");
+ leaveWord();
}else{
- $('#tip').removeClass('loading');
+ updateSentTip("Your status has been updated!",3e3,"success");
+ $("#textbox").val("");
+ $("#media_preview").html("");
leaveWord();
- updateSentTip("Update failed. Please try again.",3e3,"failure");
- $('#tweeting_button').removeClass('btn-disabled');
+ if(typeof INTERVAL_COOKIE !== 'undefined'){
+ var source = $(msg).prependTo($("#allTimeline"));
+ source.hide().slideDown('fast');
+ var statusid = $.trim($(msg).find('.status_id').text());
+ var statusText = $.trim($(msg).find('.tweet').html());
+ var statusDate = $.trim($(msg).find('span.date a').attr('id'));
+ embrTweet(source);
+ $(".mine").slideDown("fast");
+ $("#full_status").fadeIn("fast");
+ $("#currently .status-text").hide().text(limitation(text)).fadeIn("fast");
+ $("#latest_meta").hide().html("<a target=\"_blank\" href=\"status.php?id="+statusid+"\" id=\""+statusDate+"\">less than 5 seconds ago</a>").fadeIn("fast");
+ $("#currently .full-text").hide().html(statusText);
+ $("#full_meta").hide().html("<a target=\"_blank\" href=\"status.php?id="+statusid+"\" id=\""+statusDate+"\">less than 5 seconds ago</a>");
+ $("#full_meta a,.full-text a").click(function (e){e.stopPropagation();});
+ previewMedia(source);
+ freshProfile();
+ }
}
- PAUSE_UPDATE = false;
- },
- error: function (msg){
- $('#tip').removeClass('loading');
+ }else{
+ $('#tip span').hide();
+ $('#tip b').show();
leaveWord();
updateSentTip("Update failed. Please try again.",3e3,"failure");
- $('#tweeting_button').removeClass('btn-disabled');
- PAUSE_UPDATE = false;
}
- });
- }
+ PAUSE_UPDATE = false;
+ },
+ error: function (msg){
+ $('#tip span').hide();
+ $('#tip b').show();
+ leaveWord();
+ updateSentTip("Update failed. Please try again.",3e3,"failure");
+ PAUSE_UPDATE = false;
+ }
+ });
};
function shortUrlDisplay(){
var stringVar = $("#textbox").val();
updateSentTip(unshorten+" URL(s) are maintained!",3e3,"failure");
}
if (l_urls != ""){
- $('#tip').addClass('loading').find('b').css('color','transparent');
+ $('#tip span').show();
+ $('#tip b').hide();
$.post("ajax/shorturl.php",{
long_urls: l_urls
},function (data){
if (s_url){
$textbox.val($textbox.val().replace(l_url,s_url)+"");
leaveWord();
- $('#tip').removeClass('loading');
+ $('#tip span').hide();
+ $('#tip b').show();
updateSentTip("Successfully shortened your URLs!",3e3,"success");
} else{
err_cnt++;
}
}
-function shortenTweet(){
- var tweet = $.trim($("#textbox").val());
- if (tweet.length === 0){
- updateSentTip("There's nothing to shorten!",3e3,"failure");
- }else{
- $('#tip').addClass('loading');
- $.ajax({
- url: "ajax/shortenTweet.php",
- type: "POST",
- data: "text="+tweet,
- success: function(msg){
- if(msg !== 'error'){
- $("#textbox").val(msg);
- leaveWord();
- $('#tip').removeClass('loading');
- updateSentTip("Your tweet has been shortened!",5e3,"success");
- }else{
- updateSentTip("Failed to shorten your tweet.",5e3,"failure");
- }
- },
- error: function(msg){
- updateSentTip("Failed to shorten your tweet.",5e3,"failure");
- }
- });
- }
-}
$(function (){
- $("#latest_status").toggle(
- function (){
- $("#currently .status-text,#latest_meta").css("display","none");
- $("#currently .full-text,#full_meta").css("display","inline");
- },function (){
+ $("#latest_status").on("click",function (){
+ if ($(this).data("show_full")=="yes"){
$("#currently .status-text,#latest_meta").css("display","inline");
$("#currently .full-text,#full_meta").css("display","none");
- });
+ $(this).data("show_full","no");
+ } else {
+ $("#currently .status-text,#latest_meta").css("display","none");
+ $("#currently .full-text,#full_meta").css("display","inline");
+ $(this).data("show_full","yes");
+ }
+ });
$("#full_meta a,.full-text a").click(function (e){
e.stopPropagation();
});
var $temp = $("#currently .status-text");
$temp.text(limitation($temp.text()));
- $("#translateMy").live("click",function(){
- var orig = $("#textbox").val();
- ORIG_TEXT = orig;
- var lang = $.cookie('myLangs')
- if(lang === null){
- lang = 'en';
- }
- $('#tip').addClass('loading');
- translate(orig,'',lang,'transMyCallback');
- });
});
var limitation = function (text){
if (text.length > 60){
//tweet function
function rminit($this){
+ $('ul.right_menu').fadeOut('fast');
var $that = $this.parent().parent().parent();
var $rm = $that.find(".right_menu");
if($rm.length > 0){
$.ajax({
url: 'ajax/relation.php',
type: "POST",
- data: "action=show&id="+id,
+ data: "action=show&id=" + id,
success: function(msg){
- var html = '<ul class="right_menu round"><li><a class="rm_mention" href="#"><i></i>Mention</a></li>';
+ var html = '<ul class="right_menu round"><li><a class="rm_mention" href="#"><i class="fa fa-customize-mention"></i>Mention</a></li>';
var r = parseInt(msg);
- switch(r){
- case 1:
- html += '<li><a class="rm_dm" href="#"><i></i>Message</a></li>';
- case 2:
- html += '<li><a class="rm_unfollow" href="#"><i></i>Unfollow</a></li><li><a class="ul_block" href="#"><i></i>Block</a></li>';
- break;
- case 3:
- html += '<li><a class="rm_dm" href="#"><i></i>Message</a></li>';
- case 9:
- html += '<li><a class="rm_follow" href="#"><i></i>Follow</a></li><li><a class="rm_block" href="#"><i></i>Block</a></li>';
- break;
- case 4:
- html += '<li><a class="rm_follow" href="#"><i></i>Follow</a></li><li><a class="rm_unblock" href="#"><i></i>UnBlock</a></li>';
- break;
+ if (r & 1) {
+ html += '<li><a class="rm_unfollow" href="#"><i class="fa fa-times"></i>Unfollow</a></li>';
+ } else {
+ html += '<li><a class="rm_follow" href="#"><i class="fa fa-check"></i>Follow</a></li>';
+ }
+ if (r & 2) {
+ html += '<li><a class="rm_dm" href="#"><i class="fa fa-envelope"></i>Message</a></li>';
+ }
+ if (r & 4) {
+ html += '<li><a class="rm_unblock" href="#"><i class="fa fa-circle-o"></i>Unblock</a></li>';
+ } else {
+ html += '<li><a class="rm_block" href="#"><i class="fa fa-ban"></i>Block</a></li>';
}
- html += '<li><a class="rm_spam" href="#"><i></i>Report Spam</a></li><li><a href="user.php?id='+id+'">View Full Profile</a></ul>';
+ if (r & 8) {
+ html += '<li><a class="rm_unmute" href="#"><i class="fa fa-microphone"></i>Unmute</a></li>';
+ } else {
+ html += '<li><a class="rm_mute" href="#"><i class="fa fa-microphone-slash"></i>Mute</a></li>';
+ }
+ html += '<li><a class="rm_spam" href="#"><i class="fa fa-exclamation-triangle"></i>Report Spam</a></li><li><a href="user.php?id='+id+'">View Full Profile</a></ul>';
$this.parent().parent().after(html);
$(html).fadeIn('fast');
$that.removeClass();
data: "action=create&id="+id,
success: function (msg){
if (msg.indexOf("success") >= 0){
+ $this.removeClass().addClass("rm_unfollow").html("<i class=\"fa fa-times\"></i>Unfollow");
updateSentTip("You have followed "+id+"!",3e3,"success");
}else{
updateSentTip("Failed to follow "+id+",please try again.",3e3,"failure");
data: "action=destory&id="+id,
success: function (msg){
if (msg.indexOf("success") >= 0){
+ $this.removeClass().addClass("rm_follow").html("<i class=\"fa fa-check\"></i>Follow");
updateSentTip("You have unfollowed "+id+"!",3e3,"success");
}else{
updateSentTip("Failed to unfollow "+id+",please try again.",3e3,"failure");
});
}
}
+function rmmute($this){
+ var id = $this.parent().parent().parent().find(".status_word").find(".user_name").attr("id");
+ if (confirm("Are you sure to mute "+id+" ?")){
+ updateSentTip("Muting "+id+"...",5e3,"ing");
+ $.ajax({
+ url: "ajax/relation.php",
+ type: "POST",
+ data: "action=mute&id="+id,
+ success: function (msg){
+ if (msg.indexOf("success") >= 0){
+ $this.removeClass().addClass("rm_unmute").html("<i class=\"fa fa-microphone\"></i>Unmute");
+ updateSentTip("You have muted "+id+"!",3e3,"success");
+ }else{
+ updateSentTip("Failed to mute "+id+", please try again.",3e3,"failure");
+ }
+ },
+ error: function (msg){
+ updateSentTip("Failed to mute "+id+", please try again.",3e3,"failure");
+ }
+ });
+ }
+}
+function rmunmute($this){
+ var id = $this.parent().parent().parent().find(".status_word").find(".user_name").attr("id");
+ if (confirm("Are you sure to unmute "+id+" ?")){
+ updateSentTip("Unmuting "+id+"...",5e3,"ing");
+ $.ajax({
+ url: "ajax/relation.php",
+ type: "POST",
+ data: "action=unmute&id="+id,
+ success: function (msg){
+ if (msg.indexOf("success") >= 0){
+ $this.removeClass().addClass("rm_mute").html("<i class=\"fa fa-microphone-slash\"></i>Mute");
+ updateSentTip("You have unmuted "+id+"!",3e3,"success");
+ }else{
+ updateSentTip("Failed to unmute "+id+", please try again.",3e3,"failure");
+ }
+ },
+ error: function (msg){
+ updateSentTip("Failed to unmute "+id+", please try again.",3e3,"failure");
+ }
+ });
+ }
+}
function rmblock($this){
var id = $this.parent().parent().parent().find(".status_word").find(".user_name").attr("id");
if (confirm("Are you sure to block "+id+" ?")){
data: "action=block&id="+id,
success: function (msg){
if (msg.indexOf("success") >= 0){
+ $this.removeClass().addClass("rm_unblock").html("<i class=\"fa fa-circle-o\"></i>Unblock");
updateSentTip("You have blocked "+id+"!",3e3,"success");
}else{
updateSentTip("Failed to block "+id+",please try again.",3e3,"failure");
data: "action=unblock&id="+id,
success: function (msg){
if (msg.indexOf("success") >= 0){
+ $this.removeClass().addClass("rm_block").html("<i class=\"fa fa-ban\"></i>Block");
updateSentTip("You have unblocked "+id+"!",3e3,"success");
}else{
updateSentTip("Failed to unblock "+id+",please try again.",3e3,"failure");
success: function (msg){
if (msg.indexOf("success") >= 0){
updateSentTip("Favorite added successfully.",3e3,"success");
- $this.parent().parent().parent().append('<i class="faved"></i>');
- $this.removeClass().addClass("unfav_btn").attr("title","UnFav").text("UnFav");
+ $this.parent().parent().parent().append('<i class="faved fa fa-star"></i>');
+ $this.removeClass("favor_btn").addClass("unfav_btn").attr("title","UnFav");
}else{
updateSentTip("Add failed. Please try again.",3e3,"failure");
}
var mode = "In reply to ";
if (!e.ctrlKey && !e.metaKey){
var temp=[];
- temp[text] = true;
var self = '@'+$("#side_name").text();
temp[self] = true;
- var mentionArray = [text];
+ var mentionArray = [];
+ if (!(text in temp)){
+ temp[text] = true;
+ mentionArray.push(text);
+ }
+ else{
+ start = -1;
+ }
var mentions = $word.find('.tweet').find('a[href^="user.php"]');
$.each(mentions,function (){
var t = this.text;
if (!(t in temp)){
temp[t] = true;
+ if (start == -1) start = t.length+1;
mentionArray.push(t);
}
- text = mentionArray.join(' ');
});
+ text = mentionArray.join(' ');
if (mentionArray.length > 1){
mode = "Reply to all: ";
}
}
scroll(0,0);
var end = text.length;
- $("#textbox").focus().val($("#textbox").val()+text+' ').caret(start,end);
+ $("#textbox").focus().val(text+' ').caret(start,end);
$("#in_reply_to").val(in_reply_id);
$("#full_status,#latest_meta,#full_meta,#currently .full-text,#latest_meta").hide();
$("#currently .status-text").html(mode+text);
type: "post",
data: "status_id="+status_id,
success: function (msg){
- if (msg.length >= 0){
+ if (msg === "duplicated"){
+ updateSentTip("You have retweeted this tweet!",3e3,"failure");
+ } else if (msg === "empty" || msg === "error"){
+ updateSentTip("Failed to retweet!",3e3,"failure");
+ } else if (msg.length >= 0){
statusBody.parent().addClass("retweet");
statusBody.find(".source").hide();
statusBody.find(".status_info").append("<span class=\"rt_source\">Retweeted by you.").fadeIn("fast");
statusBody.find(".date").hide();
- statusBody.find(".status_info").append("<span class=\"rt_undos\" title=\"Your followers will no longer see the tweet as retweeted by you.\"> <a class=\"rt_undo\" href=\"#\">(Undo)</a><span class=\"rt_id\" style=\"display: none;\">"+msg+"</span></span>").fadeIn("fast");
+ statusBody.find(".status_info").append("<a class=\"rt_undos unrt_btn\" title=\"Your followers will no longer see the tweet as retweeted by you.\" href=\"#\"> (Undo)</a>").fadeIn("fast");
+ statusBody.find(".retw_btn").removeClass("retw_btn").addClass("unrt_btn");
+ statusBody.find(".actions").append("<span class=\"rt_id\" style=\"display:none\">" + msg + "</span>");
updateSentTip("This tweet has been retweeted!",3e3,"success");
- $(".rt_undos").tipsy({
- gravity: 's'
- });
- }else{
- if (msg === "duplicated"){
- updateSentTip("You have retweeted this tweet!",3e3,"failure");
- }else{
- updateSentTip("Failed to retweet!",3e3,"failure");
- }
}
},
error: function (msg){
$that.parent().fadeOut("fast");
}else{
$that.parent().find(".faved").fadeOut("fast");
- $this.removeClass().addClass("favor_btn").attr("title","Fav").text("Fav");
+ $this.removeClass("unfav_btn").addClass("favor_btn").attr("title","Fav");
}
updateSentTip("This tweet has been unfavored!",3e3,"success");
}else{
}
function onUndoRt($this){
if (window.confirm("Are you sure to undo this retweet?")){
- var status_id = $.trim($this.parent().find(".rt_id").text());
- var statusBody = $this.parent().parent().parent();
+ var statusBody = $this.parent().parent();
+ var status_id = $.trim(statusBody.find(".rt_id").text());
statusBody.css("background-color","#FF3300");
updateSentTip("Undoing retweet...",5e3,"ing");
$.ajax({
data: "status_id="+status_id,
success: function (msg){
if (msg.indexOf("success") >= 0){
- statusInfo = $this.parent().parent();
+ statusInfo = statusBody.find(".status_info");
if (statusInfo.find(".rt_source").size() === 1){
statusInfo.find(".source").show().find(".date").show();
statusInfo.find(".rt_source").remove()
statusInfo.find(".rt_undos").remove();
statusBody.removeClass("retweet");
}else{
- statusBody.fadeOut("fast");
+ statusBody.parent().fadeOut("fast");
}
+ statusBody.find(".unrt_btn").removeClass("unrt_btn").addClass("retw_btn");
updateSentTip("Your retweet has been undo!",3e3,"success");
}else{
updateSentTip("Undo failed. Please try again.",3e3,"failure");
});
}
}
-$(function (){
- $("#statuses .trans_close").live('click',function(e){
- e.preventDefault();
- $(e.target).parent().parent().parent().parent().find(".translated").remove();
- });
- $("#transRecover").click(function(e){
- $("#textbox").val(ORIG_TEXT);
- $(e.target).fadeOut('fast');
- });
- });
-var translate = function(text,context,lang,callback){
-
- var a = "http://www.google.com/uds/Gtranslate";
- a += "?callback="+callback;
- a += "&context="+context;
- a += "&q="+encodeURIComponent(text);
- a += "&key=notsupplied&v=1.0&nocache=1240207680396&langpair=%7C";
- a += lang;
- $.getScript(a);
-};
-var transMyCallback = function(content,translation){
- if(translation.translatedText !== null){
- $('#tip').removeClass('loading');
- $("#transArea").hide();
- $("#textbox").val(translation.translatedText);
- $("#transRecover").fadeIn('fast');
- }
-};
-var transCallback = function(content,translation){
- if(translation.translatedText !== null){
- var lang = $.cookie('transLang')
- if(lang === null){
- lang = 'zh';
- }
- var langTxt = $.cookie('fullLang');
- if(langTxt === null){
- langTxt = $('#transArea select[name=langs] option[value='+lang+']').text();
- }
- var html = '<div class="translated"><a href="#" title="Hide Translation" class="trans_close">(Hide)</a><span class="trans_header"><strong>Translation <small>(from '+translation.detectedSourceLanguage;
- html += ' to '+langTxt+')</small> : </strong></span>';
- html += '<span class="trans_body">'+translation.translatedText+'</span></div>';
- var li,target;
- if(typeof INTERVAL_COOKIE !== 'undefined'){
- li = $("#statuses ol:visible li:has(.status_id)").filter(":contains("+content+")");
- target = li.find(".status_word").filter(":first");
- }else{
- li = $("#statuses li:has(.status_id)").filter(":contains("+content+")");
- target = li.find(".status_word").filter(":first");
- }
- $(html).appendTo(target);
- li.removeClass("loading");
- }
-};
$(function (){
$('body').click(function (){
e.preventDefault();
rmunfollow($this);
break;
+ case 'rm_mute':
+ e.preventDefault();
+ rmmute($this);
+ break;
+ case 'rm_unmute':
+ e.preventDefault();
+ rmunmute($this);
+ break;
case 'rm_block':
e.preventDefault();
rmblock($this);
e.preventDefault();
rmspam($this);
break;
- //translate
- case 'trans_btn':
- e.preventDefault();
- var tBody = $this.parent().parent();
- if(tBody.find(".trans_body").length !== 0){
- return;
- }
- var id = $.trim(tBody.find('.status_id').text());
- var text = $.trim(tBody.find('.tweet').text());
- var lang = $.cookie('transLang');
- if(lang === null){
- lang = 'zh';
- }
- tBody.parent().addClass('loading');
- translate(text,id,lang,'transCallback');
- break;
// unshorturl
case 'tweet_url':
var tp = $this.text().split('/');
},
});
}
- $("#indicator").toggle(
- function (){
- $('#sidebarTip_more').slideDown('fast');
- $('#indicator').html('[-]');
- },function (){
+ $("#indicator").click(function (){
+ if ($(this).data("show_tip")=="yes"){
$('#sidebarTip_more').slideUp('fast');
$('#indicator').html('[+]');
- });
- $("#sidebarTip [contenteditable]").live('focusout',function(){
+ $(this).data("show_tip","no");
+ } else {
+ $('#sidebarTip_more').slideDown('fast');
+ $('#indicator').html('[-]');
+ $(this).data("show_tip","yes");
+ }
+ });
+ $(document).on("focusout", "#sidebarTip [contenteditable]", function(){
var $this = $("#sidebarTip [contenteditable]");
$.post(
'ajax/setTip.php',
}
);
});
- $("#sidebarTip #tip_reset").live('click',function(e){
+ $(document).on("click", "#sidebarTip #tip_reset", function(e){
e.preventDefault();
if(window.confirm('Are you sure to restore to default tips?')){
$.post(
$("#profileRefresh").click(function(e){
e.preventDefault();
var that = $(this);
- if (!that.hasClass('refreshing')){
- that.addClass('refreshing');
+ if (!that.hasClass('fa-spinner')){
+ that.addClass('fa-spinner fa-spin');
$.ajax({
url: "ajax/updateProfile.php",
type: "GET",
updateSentTip("Failed to update your profile!",3e3,"failure");
},
complete: function(){
- that.removeClass('refreshing');
+ that.removeClass('fa-spinner fa-spin');
}
});
}
// sidepost function
$(function (){
- $("#trends_title").toggle(
- function (){
+ $("#trends_title").on("click",function (){
+ if ($(this).data("show_trends")=="yes"){
+ $("#trends_title").removeClass().addClass("closed");
+ $("#trend_entries").slideUp("fast");
+ sidebarscroll();
+ $(this).data("show_trends","no");
+ } else {
$("#trends_title").removeClass().addClass("loading");
+ sidebarscroll('pause');
+ $(this).data("show_trends","yes");
updateTrends();
- },function (){
- $("#trends_title").removeClass();
- $("#trend_entries").slideUp("fast");
+ }
+ });
+ $("#following_title").on("click",function (){
+ if ($(this).data("show_flw")=="yes"){
+ $("#following_title").removeClass().addClass("closed");
+ $("#following_list").slideUp("fast");
sidebarscroll();
- });
- $("#following_title").toggle(
- function (){
+ $(this).data("show_flw","no");
+ } else {
$("#following_title").removeClass().addClass("loading");
sidebarscroll('pause');
+ $(this).data("show_flw","yes");
updateFollowing();
- },function (){
- $("#following_title").removeClass();
- $("#following_list").slideUp("fast");
+ }
+ });
+ $("#apiquota_title").on("click",function (){
+ if ($(this).data("show_api")=="yes"){
+ $("#apiquota_title").removeClass().addClass("closed");
+ $("#apiquota_list").slideUp("fast");
sidebarscroll();
- });
- $("#apiquota_title").toggle(
- function (){
+ $(this).data("show_api","no");
+ } else {
$("#apiquota_title").removeClass().addClass("loading");
sidebarscroll('pause');
+ $(this).data("show_api","yes");
updateAPIQuota();
- },function (){
- $("#apiquota_title").removeClass();
- $("#apiquota_list").slideUp("fast");
- sidebarscroll();
- });
+ }
+ });
});
function updateTrends(){
- sidebarscroll('pause');
if (navigator.geolocation) {
if ($.cookie('woeid') == undefined) {
navigator.geolocation.getCurrentPosition(function (pos, error) {
}
}
});
- $("#statuses .big-retweet-icon,#func_set .func_btn,#profileRefresh").tipsy({
- gravity: 's'
- });
- $('#symbols span').tipsy({
- gravity: $.fn.tipsy.autoNS
- });
- $("#statuses .mine").live("mouseout",function (e){
+ $(document).on("mouseout", "#statuses .mine", function (e){
$(e.target).removeClass("mine").addClass("myTweet");
});
});
type: "GET",
success: function(msg) {
searches = eval("("+msg+")");
- $(".ss_delete_btn").live("click",function(e){
+ $(document).on("click", ".ss_delete_btn", function(e){
e.preventDefault();
$("#query").val("");
if (theAC != null && searches != null) {
theAC = $("#query").autocomplete(searches, {
minChars:0,
formatItem:function(data, i, total) {
- return "<a class=\"ss_delete_btn\" href=\"#\" id=\"sgt" + data[0] + "\" >delete</a>" + data[1];
+ return "<a class=\"ss_delete_btn fa fa-trash-o\" href=\"#\" id=\"sgt" + data[0] + "\" title=\"Delete\"></a>" + data[1];
},
formatMatch:function(data, i, total) {
return data[1];
formHTML = "<h2>What are you doing?</h2>" + formHTML + "<div class=\"clear\"></div>";
$("#allTimeline").click(function(e) {
var $this = $(e.target);
- var type = $this.attr('class');
+ var matches = ($this.attr('class') || '').match(/\w+_btn/);
+ var type = matches ? matches[0] : '';
switch(type) {
case 'rt_btn':
e.preventDefault();
e.preventDefault();
onDelete($this);
break;
- case 'rt_undo':
+ case 'unrt_btn':
e.preventDefault();
onUndoRt($this);
break;
}
});
- $("#submit_btn").click(function(e){
- updateStatus();
- e.preventDefault();
- });
+ sidebarscroll('pause');
updateTrends();
});
onSubmit: function(hsb, hex, rgb, el) {
$(el).val("#" + hex);
$(el).ColorPickerHide();
- $.cookie('bodyBg',"#" + hex,{expires:365});
+ $.cookie('Bgcolor',"#" + hex,{expires:365});
location.reload();
updateSentTip('Setting saved successfully!',3000,'success');
}
e.preventDefault();
if(confirm("You will lose all customized settings!")){
$.cookie('myCSS', '/*default.css*/');
- $.cookie('theme','')
$.cookie('fontsize', '');
$.cookie('Bgcolor', '');
$.cookie('Bgimage','');
updateSentTip('Setting Reset successfully!',3000,'success');
}
});
- var style = {
- "Twitter Default":{theme:"/*default*/"},
- "Dark Rabr":{theme:"@import url(themes/1.css);"},
- "Monokai Python":{theme:"@import url(themes/2.css);"},
- "Old Times":{theme:"@import url(themes/3.css);"},
- "Pink":{theme:"@import url(themes/4.css);"},
- "Warm @lgsoltek":{theme:"@import url(themes/5.css);"},
- "Cold @lgsoltek":{theme:"@import url(themes/6.css);"},
- "Green":{theme:"@import url(themes/7.css);"},
- "Shine":{theme:"@import url(themes/8.css);"},
- "Flew":{theme:"@import url(themes/9.css);"},
- "Golden":{theme:"@import url(themes/10.css);"},
- "#red":{theme:"@import url(themes/11.css);"},
- "Storm":{theme:"@import url(themes/12.css);"},
- "City":{theme:"@import url(themes/13.css);"},
- "Cosmos":{theme:"@import url(themes/14.css);"},
- "Pride (Rainbow)":{theme:"@import url(themes/15.css); /* Have a gay day! */"},
- "Drop Bombs":{theme:"@import url(themes/16.css);"},
- "Minimal":{theme:"@import url(themes/minimal.css);"},
- };
- $.each(style, function (i,o) {
- $("#styleSelect").append('<option value="' + o.theme + '">' + i + '</option>');
- });
- var theme = $.cookie('theme') == undefined ? '/*default*/' : $.cookie('theme');
- $("#styleSelect").change(function(){
- var o =$(this).val();
- $.cookie('theme',o,{expires:365});
- $.cookie('Bgimage','');
- location.reload();
- updateSentTip('Themes Saved Successfully!',3000,'success');
- }).eq(0).val(theme);
$("textarea#myCSS").change(function(){
$.cookie('myCSS',$(this).val(),{expires:365});
location.reload();
- updateSentTip('Themes saved successfully!',3000,'success');
+ updateSentTip('Customized styles saved successfully!',3000,'success');
});
$("#AvatarUpload").click(function (e) {
e.preventDefault();
fileElementId: 'profile_image',
dataType: 'json',
success: function (data, status) {
- if (typeof(console) !== 'undefined' && console != null) {
- console.info(data);
- }
if (typeof(data.result) != 'undefined' && data.result == "success") {
$.ajax({
url: '../ajax/updateProfile.php',
fileElementId: 'profile_background',
dataType: 'json',
success: function (data, status) {
- if (typeof(console) !== 'undefined' && console != null) {
- console.info(data);
- }
if (typeof(data.result) != 'undefined' && data.result == "success") {
if ($.cookie('twitterbg') === 'true') {
$.ajax({
data: {'tile': tile},
dataType: 'json',
success: function (data, status) {
- if (typeof(console) !== 'undefined' && console != null) {
- console.info(data);
- }
if (typeof(data.result) != 'undefined' && data.result == "success") {
if ($.cookie('twitterbg') === 'true') {
$.ajax({
$(function(){
$("#allTimeline").click(function(e) {
var $this = $(e.target);
- var type = $this.attr('class');
+ var matches = ($this.attr('class') || '').match(/\w+_btn/);
+ var type = matches ? matches[0] : '';
switch(type) {
case 'rt_btn':
e.preventDefault();
e.preventDefault();
UnFavor($this);
break;
- case 'rt_undo':
+ case 'unrt_btn':
e.preventDefault();
onUndoRt($this);
break;
$("#info_reply_btn").click(function(){
var replie_id = $("#info_name").text();
- if ($("#textbox").length > 0) {
- $("#textbox").val($("#textbox").val() + "@" + replie_id + " ");
- $("#textbox").focus();
- leaveWord();
- } else {
+ if ($("#textbox").length == 0) {
$("#info_head").after('<h2>In reply to ' + replie_id + '</h2>' + formHTML);
formFunc();
- $("#textbox").val($("#textbox").val() + "@" + replie_id + " ");
- $("#textbox").focus();
- leaveWord();
}
+ $("#textbox").val($("#textbox").val() + "@" + replie_id + " ");
+ $("#textbox").focus();
+ leaveWord();
});
- if (getCookie("infoShow") == "hide") {
+ if ($.cookie("infoShow") == "hide") {
onHide();
}
$("#info_hide_btn").click(function(){
onHide();
});
- $("#info_follow_btn").click(function(e){
+ $(document).on("click", "#info_follow_btn", function(e){
e.preventDefault();
var $this = $(this);
var id = $("#info_name").text();
});
});
- $("#info_block_btn").click(function(e){
+ $(document).on("click", "#info_block_btn", function(e){
e.preventDefault();
var $this = $(this);
var id = $("#info_name").text();
}
});
- $("#block_btn").click(function(e){
+ $(document).on("click", "#mute_btn", function(e){
+ e.preventDefault();
+ var $this = $(this);
+ var id = $("#info_name").text();
+ if (confirm("Are you sure to mute " + id + " ?")) {
+ updateSentTip("Muting " + id + "...", 5000, "ing");
+ $.ajax({
+ url: "ajax/relation.php",
+ type: "POST",
+ data: "action=mute&id=" + id,
+ success: function(msg) {
+ if (msg.indexOf("success") >= 0) {
+ updateSentTip("You have muted " + id + "!", 3000, "success");
+ $this.after('<a class="btn" id="unmute_btn" href="javascript:void(0)">Unmute</a>');
+ $this.remove();
+ } else {
+ updateSentTip("Failed to mute " + id + ", please try again.", 3000, "failure");
+ }
+ },
+ error: function(msg) {
+ updateSentTip("Failed to mute " + id + ", please try again.", 3000, "failure");
+ }
+ });
+ }
+ });
+
+ $(document).on("click", "#unmute_btn", function(e){
+ e.preventDefault();
+ var $this = $(this);
+ var id = $("#info_name").text();
+ if (confirm("Are you sure to unmute " + id + " ?")) {
+ updateSentTip("Unmuting " + id + "...", 5000, "ing");
+ $.ajax({
+ url: "ajax/relation.php",
+ type: "POST",
+ data: "action=unmute&id=" + id,
+ success: function(msg) {
+ if (msg.indexOf("success") >= 0) {
+ updateSentTip("You have unmuted " + id + "!", 3000, "success");
+ $this.after('<a class="btn" id="mute_btn" href="javascript:void(0)">Mute</a>');
+ $this.remove();
+ } else {
+ updateSentTip("Failed to unmute " + id + ", please try again.", 3000, "failure");
+ }
+ },
+ error: function(msg) {
+ updateSentTip("Failed to unmute " + id + ", please try again.", 3000, "failure");
+ }
+ });
+ }
+ });
+
+ $(document).on("click", "#block_btn", function(e){
e.preventDefault();
var $this = $(this);
var id = $("#info_name").text();
}
});
- $("#unblock_btn").click(function(e){
+ $(document).on("click", "#unblock_btn", function(e){
e.preventDefault();
var $this = $(this);
var id = $("#info_name").text();
});
});
-function getCookie(name){
- var strCookie=document.cookie;
- var arrCookie=strCookie.split("; ");
- for(var i=0;i<arrCookie.length;i++){
- var arr=arrCookie[i].split("=");
- if(arr[0]==name)return unescape(arr[1]);
- }
-return "";
-}
-function setCookie(name,value,expireHours){
- var cookieString=name+"="+escape(value);
- if(expireHours>0){
- var date=new Date();
- date.setTime(date.getTime+expireHours*3600*1000);
- cookieString=cookieString+"; expire="+date.toGMTString();
- }
- document.cookie=cookieString;
-}
function onHide(){
$this = $("#info_hide_btn");
$this.after('<a class="btn" id="info_show_btn" href="javascript:void(0)">Show @</a>');
});
$(this).after('<a class="btn" id="info_hide_btn" href="javascript:void(0)">Hide @</a>');
$(this).remove();
- $("#info_hide_btn").live("click", function(){
+ $("#info_hide_btn").click(function(){
onHide();
});
- setCookie("infoShow","show");
+ $.cookie("infoShow","show");
});
$(".timeline li").each(function(i,o) {
$(this).hide();
}
});
- setCookie("infoShow","hide");
+ $.cookie("infoShow","hide");
}
case 'avatar':
e.preventDefault();
ulinit($this);
+ e.stopPropagation();
break;
}
switch(e.target.className) {
e.preventDefault();
ulunfollow($this);
break;
+ case 'ul_mute':
+ e.preventDefault();
+ ulmute($this);
+ break;
+ case 'ul_unmute':
+ e.preventDefault();
+ ulunmute($this);
+ break;
case 'ul_block':
e.preventDefault();
ulblock($this);
});
})
function ulinit($this) {
+ $('ul.right_menu').fadeOut('fast');
var $that = $this.parent().parent();
var ul = $that.find(".right_menu");
if (ul.length>0) {
type: "POST",
data: "action=show&id=" + id,
success: function(msg){
- var html = '<ul class="right_menu round"><li><a class="ul_mention" href="#"><i></i>Mention</a></li>';
+ var html = '<ul class="right_menu round"><li><a class="ul_mention" href="#"><i class="fa fa-customize-mention"></i>Mention</a></li>';
var r = parseInt(msg);
- switch(r){
- case 1:
- html += '<li><a class="ul_dm" href="#"><i></i>Message</a></li>';
- case 2:
- html += '<li><a class="ul_unfollow" href="#"><i></i>Unfollow</a></li><li><a class="ul_block" href="#"><i></i>Block</a></li>';
- break;
- case 3:
- html += '<li><a class="ul_dm" href="#"><i></i>Message</a></li>';
- case 9:
- html += '<li><a class="ul_follow" href="#"><i></i>Follow</a></li><li><a class="ul_block" href="#"><i></i>Block</a></li>';
- break;
- case 4:
- html += '<li><a class="ul_follow" href="#"><i></i>Follow</a></li><li><a class="ul_unblock" href="#"><i></i>UnBlock</a></li>';
- break;
+ if (r & 1) {
+ html += '<li><a class="ul_unfollow" href="#"><i class="fa fa-times"></i>Unfollow</a></li>';
+ } else {
+ html += '<li><a class="ul_follow" href="#"><i class="fa fa-check"></i>Follow</a></li>';
+ }
+ if (r & 2) {
+ html += '<li><a class="ul_dm" href="#"><i class="fa fa-envelope"></i>Message</a></li>';
}
- html += '<li><a class="ul_spam" href="#"><i></i>Report Spam</a></li><li><a href="user.php?id='+id+'">View Full Profile</a></ul>';
+ if (r & 4) {
+ html += '<li><a class="ul_unblock" href="#"><i class="fa fa-circle-o"></i>Unblock</a></li>';
+ } else {
+ html += '<li><a class="ul_block" href="#"><i class="fa fa-ban"></i>Block</a></li>';
+ }
+ if (r & 8) {
+ html += '<li><a class="ul_unmute" href="#"><i class="fa fa-microphone"></i>Unmute</a></li>';
+ } else {
+ html += '<li><a class="ul_mute" href="#"><i class="fa fa-microphone-slash"></i>Mute</a></li>';
+ }
+ html += '<li><a class="ul_spam" href="#"><i class="fa fa-exclamation-triangle"></i>Report Spam</a></li><li><a href="user.php?id='+id+'">View Full Profile</a></ul>';
$this.parent().after(html);
$(html).fadeIn('fast');
$that.removeClass("loading");
}
}
function ulmention($this, e) {
- var replie_id = getid($this.parent());;
+ var text = "@" + getid($this.parent()) + ' ';
if ($("#textbox").length > 0) {
- var text = "@" + replie_id;
- scroll(0, 0);
- $("#textbox").focus().val($("#textbox").val() + text + ' ');
- leaveWord();
+ var sentIdBox = $("#sent_id");
+ if (sentIdBox.length > 0) {
+ $('#statuses h2:first-of-type').html("Mention");
+ }
} else {
$("#statuses h2").before('<h2>Mention</h2>' + formHTML);
formFunc();
- var text = "@" + replie_id;
- scroll(0, 0);
- $("#textbox").focus().val($("#textbox").val() + text + ' ');
- leaveWord();
}
+ scroll(0, 0);
+ $("#textbox").focus().val(text);
+ leaveWord();
}
function uldm($this, e) {
var replie_id = getid($this.parent());
+ var dmTitle = 'Send direct message to <input type="text" style="border: 1px solid rgb(167, 166, 170); margin: 0px 0px 6px; padding: 2px; height: 14px; width: 120px; font-size: 13px;" name="sent_id" id="sent_id" value="' + replie_id + '">';
if ($("#textbox").length > 0) {
- var text = "D " + replie_id;
+ var sentIdBox = $("#sent_id");
+ if (sentIdBox.length == 0) {
+ $("#statuses h2:first-of-type").html(dmTitle);
+ } else {
+ $("#sent_id").val(replie_id);
+ }
} else {
- $("#statuses h2").before('<h2>Send direct message</h2>' + formHTML);
+ $("#statuses h2").before('<h2>' + dmTitle + '</h2>' + formHTML);
formFunc();
- var text = "D " + replie_id;
}
scroll(0, 0);
- $("#textbox").focus().val($("#textbox").val() + text + ' ');
+ $("#textbox").focus().val('');
leaveWord();
}
+function ulmute($this) {
+ var id = getid($this.parent());
+ updateSentTip("Muting " + id + "...", 5000, "ing");
+ $.ajax({
+ url: "ajax/relation.php",
+ type: "POST",
+ data: "action=mute&id=" + id,
+ success: function (msg) {
+ if (msg.indexOf("success") >= 0) {
+ $this.parent().parent().parent().addClass("reply");
+ $this.removeClass().addClass("ul_unmute").html("<i class=\"fa fa-microphone\"></i>Unmute");
+ updateSentTip("You have muted " + id + "!", 3000, "success");
+ } else {
+ updateSentTip("Failed to mute " + id + ", please try again.", 3000, "failure");
+ }
+ },
+ error: function (msg) {
+ updateSentTip("Failed to mute " + id + ", please try again.", 3000, "failure");
+ }
+ });
+}
+function ulunmute($this) {
+ var id = getid($this.parent());
+ updateSentTip("Unmuting " + id + "...", 5000, "ing");
+ $.ajax({
+ url: "ajax/relation.php",
+ type: "POST",
+ data: "action=unmute&id=" + id,
+ success: function (msg) {
+ if (msg.indexOf("success") >= 0) {
+ $this.parent().parent().parent().addClass("reply");
+ $this.removeClass().addClass("ul_mute").html("<i class=\"fa fa-microphone-slash\"></i>Mute");
+ updateSentTip("You have unmuted " + id + "!", 3000, "success");
+ } else {
+ updateSentTip("Failed to unmute " + id + ", please try again.", 3000, "failure");
+ }
+ },
+ error: function (msg) {
+ updateSentTip("Failed to unmute " + id + ", please try again.", 3000, "failure");
+ }
+ });
+}
function ulfollow($this) {
var id = getid($this.parent());
updateSentTip("Following " + id + "...", 5000, "ing");
success: function (msg) {
if (msg.indexOf("success") >= 0) {
$this.parent().parent().parent().addClass("reply");
+ $this.removeClass().addClass("ul_unfollow").html("<i class=\"fa fa-times\"></i>Unfollow");
updateSentTip("You have followed " + id + "!", 3000, "success");
} else {
updateSentTip("Failed to follow " + id + ", please try again.", 3000, "failure");
success: function (msg) {
if (msg.indexOf("success") >= 0) {
$this.parent().parent().parent().addClass("filter");
+ $this.removeClass().addClass("ul_follow").html("<i class=\"fa fa-check\"></i>Follow");
updateSentTip("You have unfollowed " + id + "!", 3000, "success");
} else {
updateSentTip("Failed to unfollow " + id + ", please try again.", 3000, "failure");
freshProfile();
}
});
-});
\ No newline at end of file
+});
<?php
- define('API_URL', 'https://api.twitter.com/1.1');
-
- // Config
- define('SECURE_KEY', 'YOU SHOULD CHANGE IT'); //You should NOT leave it blank
- define('BASE_URL','http://embr.in'); //Where your embr is hosted, i.e. http://bugbug.tk
+ /* Basic Configuration
+ *
+ * - A SECURE_KEY is a string that being used to encrypt and decrypt cookies, you should NOT leave *
+ * it empty due to security reasons, a long random string is usually an option. *
+ *
+ * - The BASE_URL is where your embrr hosted and will be used in many in-site links. *
+ *
+ * - The CONSUMER_KEY and CONSUMER_SECRET is two string that Twitter used to authorize applications, *
+ * you can find them on the app detail page at https://api.twitter.com. You can leave the default *
+ * values unchanged if you don't know how to create a new app on twitter or you can't access twitter *
+ * website, but this may be unsafe for you and your account. Use at your own risk! *
+ */
+ define('SECURE_KEY', 'YOU SHOULD CHANGE IT');
+ define('BASE_URL','http://embr.in');
define("CONSUMER_KEY", "TEItTaPASySnYxziOyIdag");
define("CONSUMER_SECRET", "xJEoWvBumpqgiiBuviWTa7GT8KCvP7Kv3n0hixhJaZY");
- define('ID_AUTH',false); // if you set id_auth true, u MUST set up the following AUTH_ID list
+ /* Private Setting
+ *
+ * If you set ID_AUTH true, only whitelisted user can login and use this embrr, you must set up the *
+ * following AUTH_ID if you do so. Authorized user ID is seperated by ','. *
+ */
+ define('ID_AUTH',false);
$AUTH_ID = array('username1','username2','username3','......');
- //Optional Information
- define('SITE_OWNER', 'TWITTER'); //Your Twitter ID
- define('BLOG_SITE',''); //blog_site
+ /* Optional Information
+ *
+ * Here you can set the site owner's Twitter ID and website URL, they will show at the footer. *
+ */
+ define('SITE_OWNER', 'TWITTER');
+ define('BLOG_SITE','');
?>
$rt_status = $status->retweeted_status;
$status_owner = $rt_status->user;
$date = format_time($status->created_at);
- $text = formatEntities($rt_status->entities,$rt_status->text);
+ $text = formatEntities(
+ $rt_status->entities,
+ isset($rt_status->extended_entities) ? $rt_status->extended_entities : null,
+ $rt_status->text);
$html = '<li>
<span class="status_author">
<a href="user.php?id='.$status_owner->screen_name.'" target="_blank"><img id="avatar" src="'.getAvatar($status_owner->profile_image_url).'" title="Hello, I am '.$status_owner->screen_name.'. Click for more..." /></a>
</span>
<span class="status_body">
- <span title="Retweets from people you follow appear in your timeline." class="big-retweet-icon"></span>
+ <span title="Retweets from people you follow appear in your timeline." class="big-retweet-icon fa fa-retweet"></span>
<span class="status_id">'.$status->id_str.'</span>
- <span class="status_word"><a class="user_name" href="user.php?id='.$status_owner->screen_name.'" id="'.$status_owner->screen_name.'">'.($_COOKIE['shownick']=='true' ? $status_owner->name : $status_owner->screen_name).'</a> <span class="tweet"> '.$text.'</span></span>
- <span class="actions">
- <a class="replie_btn" title="Reply" href="#">Reply</a>
- <a class="rt_btn" title="Retweet" href="#">Retweet</a>';
+ <span class="status_word"><a class="user_name" href="user.php?id='.$status_owner->screen_name.'" id="'.$status_owner->screen_name.'">'.($_COOKIE['shownick']=='true' ? $status_owner->name : $status_owner->screen_name).'</a>
+ <span class="tweet"> '.$text['text'].'</span>
+ </span>'.
+ '<span class="extended_entities">'.$text['extended'].'</span>'
+ .'<span class="actions">
+ <a class="replie_btn fa fa-reply" title="Reply" href="#"></a>
+ <a class="rt_btn fa fa-share" title="Quote" href="#"></a>';
if($retweetByMe != true){
- $html .= '<a class="retw_btn" title="New Retweet" href="#">New Retweet</a>';
+ $html .= '<a class="retw_btn fa fa-retweet" title="New Retweet" href="#"></a>';
} else {
- $html .= '<a class="unrt_btn" title="UndoRT" href="#">UndoRT</a>';
+ $html .= '<a class="unrt_btn fa fa-retweet" title="Undo Retweet" href="#"></a>';
}
- $html .= $status->favorited ? '<a class="unfav_btn" title="UnFav" href="#">UnFav</a>' : '<a class="favor_btn" title="Fav" href="#">Fav</a>';
- $html .= '<a class="trans_btn" title="Translate" href="#">Translate</a>';
+ $html .= $status->favorited ? '<a class="unfav_btn fa fa-star-o" title="UnFav" href="#"></a>' : '<a class="favor_btn fa fa-star-o" title="Fav" href="#"></a>';
if($retweetByMe == true){
$html .= '<span class="rt_id" style="display:none">'.$status->id_str.'</span>';
}
<span class="date"><a href="status.php?id='.$rt_status->id_str.'" id="'.$date.'" target="_blank">'.date('Y-m-d H:i:s', $date).'</a></span>
</span>
</span>';
- $html .= $status->favorited ? '<i class="faved"></i>' : '';
+ $html .= $status->favorited ? '<i class="faved fa fa-star"></i>' : '';
$html .= '</li>';
return $html;
}
function format_retweet_of_me($status){
$status_owner = $status->user;
$date = format_time($status->created_at);
- $text = formatEntities($status->entities,$status->text);
+ $text = formatEntities(
+ $status->entities,
+ isset($status->extended_entities) ? $status->extended_entities : null,
+ $status->text);
$html = '<li>
<span class="status_author">
<a href="user.php?id='.$status_owner->screen_name.'" target="_blank"><img id="avatar" src="'.getAvatar($status_owner->profile_image_url).'" title="click for more..." /></a>
</span>
<span class="status_body">
- <span title="Retweets from people you follow appear in your timeline." class="big-retweet-icon"></span><span class="status_id">'.$status->id_str.'</span>
+ <span title="Retweets from people you follow appear in your timeline." class="big-retweet-icon fa fa-retweet"></span><span class="status_id">'.$status->id_str.'</span>
<span class="status_word">
- <a class="user_name" href="user.php?id='.$status_owner->screen_name.'" id="'.$status_owner->screen_name.'">'.($_COOKIE['shownick']=='true' ? $status_owner->name : $status_owner->screen_name).'</a><span class="tweet"> '.$text.'</span></span>
- <span class="actions">
- <a class="replie_btn" title="Reply" href="#">Reply</a>
+ <a class="user_name" href="user.php?id='.$status_owner->screen_name.'" id="'.$status_owner->screen_name.'">'.($_COOKIE['shownick']=='true' ? $status_owner->name : $status_owner->screen_name).'</a><span class="tweet"> '.$text['text'].'</span></span>'.
+ '<span class="extended_entities">'.$text['extended'].'</span>'
+ .'<span class="actions">
+ <a class="replie_btn fa fa-reply" title="Reply" href="#"></a>
<a class="rt_btn" title="Retweet" href="#">Retweet</a>';
- $html .= $status->favorited ? '<a class="unfav_btn" title="UnFav" href="#">UnFav</a>' : '<a class="favor_btn" title="Fav" href="#">Fav</a>';
- $html .= '<a class="trans_btn" title="Translate" href="#">Translate</a>
- </span>
+ $html .= $status->favorited ? '<a class="unfav_btn fa fa-star-o" title="UnFav" href="#"></a>' : '<a class="favor_btn fa fa-star-o" title="Fav" href="#"></a>';
+ $html .= '</span>
<span class="status_info">via '.$status->source.'
<span class="date"><a href="status.php?id='.$status->id_str.'" id="'.$date.'" target="_blank">'.date('Y-m-d H:i:s', $date).'</a></span>
retweeted by '.$status->retweet_count.
(($status->retweet_count>1)?' persons':' person').'
</span>
</span>';
- $html .= $status->favorited ? '<i class="faved"></i>' : '';
+ $html .= $status->favorited ? '<i class="faved fa fa-star"></i>' : '';
$html .= '</li>';
return $html;
}
function format_timeline($status, $screen_name, $updateStatus = false){
$user = $status->user;
$date = format_time($status->created_at);
- $text = formatEntities($status->entities,$status->text);
+ $text = formatEntities(
+ $status->entities,
+ isset($status->extended_entities) ? $status->extended_entities : null,
+ $status->text);
- if(preg_match('/^\@'.getTwitter()->username.'/i', $text) == 1){
+ if(preg_match('/^\@'.getTwitter()->username.'/i', $text['text']) == 1){
$output = "<li class=\"reply\">";
}elseif($updateStatus == true){
$output = "<li class=\"mine\">";
</span>
<span class="status_body">
<span class="status_id">'.$status->id_str.'</span>
- <span class="status_word"><a class="user_name" href="user.php?id='.$user->screen_name.'" id="'.$user->screen_name.'">'.($_COOKIE['shownick']=='true' ? $user->name : $user->screen_name).'</a> <span class="tweet"> '.$text.'</span></span>';
+ <span class="status_word"><a class="user_name" href="user.php?id='.$user->screen_name.'" id="'.$user->screen_name.'">'.($_COOKIE['shownick']=='true' ? $user->name : $user->screen_name).'</a> <span class="tweet"> '.$text['text'].'</span></span>';
+ $output .= '<span class="extended_entities">'.$text['extended'].'</span>';
$output .= "<span class=\"actions\">
- <a class=\"replie_btn\" title=\"Reply\" href=\"#\">Reply</a>
- <a class=\"rt_btn\" title=\"Retweet\" href=\"#\">Retweet</a>
+ <a class=\"replie_btn fa fa-reply\" title=\"Reply\" href=\"#\"></a>
+ <a class=\"rt_btn fa fa-share\" title=\"Quote\" href=\"#\"></a>
";
if($user->screen_name != $screen_name){
- $output .= "<a class=\"retw_btn\" title=\"New Retweet\" href=\"#\">New Retweet</a>";
+ $output .= "<a class=\"retw_btn fa fa-retweet\" title=\"New Retweet\" href=\"#\"></a>";
}
- $output .= $status->favorited == true ? "<a class=\"unfav_btn\" title=\"UnFav\" href=\"#\">UnFav</a>" : "<a class=\"favor_btn\" title=\"Fav\" href=\"#\">Fav</a>";
- $output .= "<a class=\"trans_btn\" title=\"Translate\" href=\"#\">Translate</a>";
- if ($user->screen_name == $screen_name) $output .= "<a class=\"delete_btn\" title=\"Delete\" href=\"#\">Delete</a>";
+ $output .= $status->favorited == true ? "<a class=\"unfav_btn fa fa-star-o\" title=\"UnFav\" href=\"#\"></a>" : "<a class=\"favor_btn fa fa-star-o\" title=\"Fav\" href=\"#\"></a>";
+ if ($user->screen_name == $screen_name) $output .= "<a class=\"delete_btn fa fa-trash-o\" title=\"Delete\" href=\"#\"></a>";
$output .= "</span><span class=\"status_info\">";
if ($status->in_reply_to_status_id) $output .= "<span class=\"in_reply_to\"> <a class=\"ajax_reply\" href=\"ajax/status.php?id=$status->in_reply_to_status_id_str&uid=$user->id \">to $status->in_reply_to_screen_name</a> </span>";
$output .= "<span class=\"source\">via $status->source</span>
<span class=\"date\"><a href=\"status.php?id=$status->id_str\" id=\"$date\" target=\"_blank\">".date('Y-m-d H:i:s', $date)."</a></span>
</span>
</span>";
- $output .= $status->favorited == true ? '<i class="faved"></i>' : '';
+ $output .= $status->favorited == true ? '<i class="faved fa fa-star"></i>' : '';
$output .= "</li>";
return $output;
}
$messenger = $message->sender;
}
$date = format_time($message->created_at);
- $text = formatEntities($message->entities,$message->text);
+ $text = formatEntities(
+ $message->entities,
+ isset($message->extended_entities) ? $message->extended_entities : null,
+ $message->text);
$output = "
<li>
</span>
<span class=\"status_body\">
<span class=\"status_id\">$message->id </span>
- <span class=\"status_word\"><a class=\"user_name\" href=\"user.php?id=$name\" id=\"$name\">".($_COOKIE["shownick"]=='true' ? $nick : $name)."</a> $text </span>
- <span class=\"actions\">
+ <span class=\"status_word\"><a class=\"user_name\" href=\"user.php?id=$name\" id=\"$name\">".($_COOKIE["shownick"]=='true' ? $nick : $name)."</a> ".$text['text']." </span>".
+ '<span class="extended_entities">'.$text['extended'].'</span>'
+ ."<span class=\"actions\">
";
if ($isSentPage) {
- $output .= "<a class=\"msg_delete_btn\" href=\"#\">delete</a>";
+ $output .= "<a class=\"msg_delete_btn fa fa-trash-o\" href=\"#\" title=\"Delete\"></a>";
} else {
- $output .= "<a class=\"msg_replie_btn\" href=\"#\">reply</a><a class=\"msg_delete_btn\" href=\"#\">delete</a>";
+ $output .= "<a class=\"msg_replie_btn fa fa-reply\" href=\"#\" title=\"Reply\"></a><a class=\"msg_delete_btn fa fa-trash-o\" href=\"#\" title=\"Delete\"></a>";
}
$output .="</span><span class=\"status_info\"><span class=\"date\" id=\"$date\">".date('Y-m-d H:i:s', $date)."</span></span></span></li>";
return $output;
//添加标签链接
$tagReg = "/\B(\#{1}([\w]*[\pN\pC\pL]+[\w]*))([\s]*)/u";
- $text = preg_replace($tagReg, '<a target="_blank" href="search.php?q=%23\2">#<span class="hashtag">\2</span></a>\3', $text);
+ $text = preg_replace_callback($tagReg, function($matches) {
+ return '<a target="_blank" href="search.php?q=%23'.rawurlencode($matches[2]).'">#<span class="hashtag">'.$matches[2].'</span></a>'.$matches[3];
+ }, $text);
$text = formatTweetID($text);
return $text;
}
- function formatEntities(&$entities,$html){
+ function formatEntities($entities,$extended_entities,$html){
$user_mentions = $entities->user_mentions;
$hashtags = $entities->hashtags;
$urls = $entities->urls;
if(count($hashtags) > 0) {
foreach($hashtags as $hashtag) {
$text = $hashtag->text;
- $html = str_replace("#$text","<a target=\"_blank\" href=\"search.php?q=%23$text\">#<span class=\"hashtag\">$text</span></a>",$html);
+ $html = str_replace("#$text","<a target=\"_blank\" href=\"search.php?q=%23".rawurlencode($text)."\">#<span class=\"hashtag\">$text</span></a>",$html);
}
}
if(count($urls) > 0) {
$html = str_replace($media->url,"<a href=\"$url\" target=\"_blank\" rel=\"noreferrer\">$media->display_url</a>",$html);
}
}
- return $html;
+ $ret = array('text' => $html);
+
+ $extended_str = '';
+ if($extended_entities != null) {
+ if (isset($extended_entities->media)) {
+ $medias = $extended_entities->media;
+ foreach($medias as $media) {
+ $url = $media->media_url_https;
+ if (getcookie('p_avatar') == 'true') {
+ $url = 'img.php?imgurl='.$url;
+ }
+ $extended_str .= "<a href=\"$url\" target=\"_blank\" rel=\"noreferrer\">$media->display_url</a>";
+ }
+ }
+ }
+ $ret['extended'] = $extended_str;
+
+ return $ret;
}
function formatTweetID($text){
}
return false;
}
-
-
- function imageUpload($image){
- $t = getTwitter();
- $signingurl = API_URL.'/account/verify_credentials.json';
- $request = OAuthRequest::from_consumer_and_token($t->consumer, $t->token, 'GET', $signingurl, array());
- $request->sign_request($t->sha1_method, $t->consumer, $t->token);
- $r_header = $request->to_header("https://api.twitter.com/");
-
- $url = 'http://img.ly/api/2/upload.json';
- $postdata = array('media' => $image);
- $ch = curl_init($url);
- if($postdata !== false)
- {
- curl_setopt ($ch, CURLOPT_POST, true);
- curl_setopt ($ch, CURLOPT_POSTFIELDS, $postdata);
- }
- curl_setopt($ch, CURLOPT_HTTPHEADER, array('X-Auth-Service-Provider: '.$signingurl,'X-Verify-Credentials-'.$r_header));
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
- curl_setopt($ch, CURLOPT_USERAGENT, 'embr');
- curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
- curl_setopt($ch, CURLOPT_TIMEOUT,120);
- curl_setopt($ch, CURLOPT_CONNECTTIMEOUT,5);
-
- $response = curl_exec($ch);
- $response_info=curl_getinfo($ch);
- curl_close($ch);
-
- if ($response_info['http_code'] == 200) {
- return objectifyJson($response);
- } else {
- return $response_info['http_code'];
- }
- }
function getTwitter() {
if(loginStatus()){
function loginStatus() {
if(isset($_SESSION['login_status'])){
return $_SESSION['login_status'] == 'verified' ? true : false;
- }elseif(getEncryptCookie("oauth_token") != "" && getEncryptCookie("oauth_token_secret") != "" && getEncryptCookie("user_id") != "" && getEncryptCookie("twitese_name") != ""){
- $access_token = array("oauth_token" => getEncryptCookie("oauth_token"), "oauth_token_secret" => getEncryptCookie("oauth_token_secret"), "user_id" => getEncryptCookie("user_id"), "screen_name" => getEncryptCookie("twitese_name"));
+ }elseif(getEncryptCookie("oauth_token") != "" && getEncryptCookie("oauth_token_secret") != "" && getCookie("user_id") != "" && getCookie("name") != ""){
+ $access_token = array("oauth_token" => getEncryptCookie("oauth_token"), "oauth_token_secret" => getEncryptCookie("oauth_token_secret"), "user_id" => getCookie("user_id"), "screen_name" => getCookie("name"));
$_SESSION['access_token'] = $access_token;
$_SESSION['login_status'] = 'verified';
refreshProfile();
$relationship = getTwitter()->relationship($target, $source)->relationship;
$target = $relationship->target;
$source = $relationship->source;
- if($source->blocking != null){
- return 4;
+ $result = 0;
+ if($source->muting == true){
+ $result |= 8;
}
- if($source->following == true && $target->following == true){
- return 1;
+ if($source->blocking == true){
+ $result |= 4;
}
- if($source->following == true && $target->following == false){
- return 2;
+ if($target->following == true){
+ $result |= 2;
}
- if($source->following == false && $target->following == true){
- return 3;
+ if($source->following == true){
+ $result |= 1;
}
- return 9;
+ return $result;
}
function urlshorten($url, $type='goo.gl'){
* twitterlibphp - http://github.com/jdp/twitterlibphp
*/
-//require_once('config.php');
-//require_once('oauth_lib.php');
+/* API Settings
+ *
+ * These are the URLs embrr use for all API calls,
+ * DO NOT change unless you know what you're doing!
+ */
+define('API_URL', 'https://api.twitter.com/1.1');
+define('UPLOAD_URL', 'https://upload.twitter.com/1.1');
/**
* Twitter OAuth class
/**
* GET wrappwer for oAuthRequest.
*/
- function get($url, $parameters = array()) {
- $response = $this->oAuthRequest($url, 'GET', $parameters);
+ function get($url, $parameters = array(), $host=NULL) {
+ $response = $this->oAuthRequest($url, 'GET', $parameters, NULL, $host);
if($response == false){
return false;
}
/**
* POST wreapper for oAuthRequest.
*/
- function post($url, $parameters = array(), $multipart = NULL) {
- $response = $this->oAuthRequest($url, 'POST', $parameters, $multipart);
+ function post($url, $parameters = array(), $multipart = NULL, $host = NULL) {
+ $response = $this->oAuthRequest($url, 'POST', $parameters, $multipart, $host);
if($response === false){
return false;
}
/**
* Format and sign an OAuth / API request, then make an HTTP request
*/
- function oAuthRequest($url, $method, $parameters, $multipart=NULL) {
+ function oAuthRequest($url, $method, $parameters, $multipart=NULL, $host=NULL) {
if ($url[0] == '/') { //non-twitter.com api shall offer the entire url.
- $url = "{$this->host}{$url}.json";
+ if ($host == NULL) {
+ $host = $this->host;
+ }
+ $url = "{$host}{$url}.json";
}
$request = OAuthRequest::from_consumer_and_token($this->consumer, $this->token, $method, $url, $parameters);
$request->sign_request($this->sha1_method, $this->consumer, $this->token);
/* ---------- API METHODS ---------- */
/* */
/* ---------- Block ---------- */
+ function mutesList($cursor=-1, $skip_status = true){
+ $url = '/mutes/users/list';
+ $args = array();
+ if($cursor)
+ $args['cursor'] = $cursor;
+ $args['skip_status'] = $skip_status;
+ return $this->get($url, $args);
+ }
+
function blockingList($id, $cursor=-1, $skip_status = true){
$url = '/blocks/list';
$args = array();
return $this->get($url, $args);
}
+ function newDirectMessage($id = false, $message = false){ //TODO: Use this to send DMs
+ $url = '/direct_messages/new';
+ $args = array();
+ if ($id)
+ $args['screen_name'] = $id;
+ if ($message)
+ $args['text'] = $message;
+ return $this->post($url, $args);
+ }
+
function sentDirectMessages($since_id = false, $max_id = false, $count = false, $include_entities = true){
$url = '/direct_messages/sent';
$args = array();
return $this->get($url, $args);
}
+ function muteUser($screen_name){
+ $url = "/mutes/users/create";
+ $args = array();
+ $args['screen_name'] = $screen_name;
+ return $this->post($url, $args);
+ }
+
+ function unmuteUser($screen_name){
+ $url = "/mutes/users/destroy";
+ $args = array();
+ $args['screen_name'] = $screen_name;
+ return $this->post($url, $args);
+ }
+
/* ---------- Ratelimit ---------- */
/* this API changed a lot due to the
* update of twitter's limit policy,
return $this->get($url,$args);
}
- function update($status, $replying_to = false,$include_entities = true){
+ function update($status, $replying_to = false,$include_entities = true, $media_ids = false){
try{
$url = '/statuses/update';
$args = array();
$args['in_reply_to_status_id'] = $replying_to;
if($include_entities)
$args['include_entities'] = $include_entities;
+ if($media_ids)
+ $args['media_ids'] = $media_ids;
return $this->post($url, $args);
}catch(Exception $ex){
echo $ex->getLine." : ".$ex->getMessage();
return $this->post($url, $args);
}
- function updateMedia($status,$image,$replying_to = false) {
- $url = 'statuses/update_with_media';
+ function uploadMedia($image) {
+ $url = '/media/upload';
$args = array();
- if($status) $args['status'] = $status;
- if($replying_to) $args['in_reply_to_status_id'] = $replying_to;
$mul = array();
- if($image) $mul['media'][] = $image;
- return $this->post($url,$args,$mul);
+ $mul['media'] = $image;
+ return $this->post($url,$args,$mul,UPLOAD_URL);
}
}
$statuses = $t->listStatus($id, $since_id, $max_id);
$listInfo = $t->listInfo($id);
if ($statuses === false) {
- header('location: error.php');exit();
+ header('location: error.php?code='.$t->http_code);exit();
}
$isFollower = $t->isFollowedList($id);
$output .= "</ol><div id=\"pagination\">";
- $output .= "<a id=\"less\" class=\"round more\" style=\"float: left;\" href=\"list.php?id={$id}&since_id={$firstid}\">Back</a>";
- $output .= "<a id=\"more\" class=\"round more\" style=\"float: right;\" href=\"list.php?id={$id}&max_id={$lastid}\">Next</a>";
+ $output .= "<a id=\"less\" class=\"btn btn-white\" style=\"float: left;\" href=\"list.php?id={$id}&since_id={$firstid}\">Back</a>";
+ $output .= "<a id=\"more\" class=\"btn btn-white\" style=\"float: right;\" href=\"list.php?id={$id}&max_id={$lastid}\">Next</a>";
$output .= "</div>";
default:
$lists = false;
}
- $nextlist = $lists->next_cursor;
- $prelist = $lists->previous_cursor;
+ $nextlist = $lists->next_cursor_str;
+ $prelist = $lists->previous_cursor_str;
$lists = $lists->lists;
if ($lists === false) {
- header('location: error.php');exit();
+ header('location: error.php?code='.$t->http_code);exit();
}
$empty = count($lists) == 0? true: false;
if ($empty) {
- echo "<div id=\"empty\">No Tweet To Display</div>";
+ echo "<div id=\"empty\">No List To Display</div>";
} else {
$output = '<ol class="rank_list">';
foreach ($lists as $list) {
- $listurl = substr($list->uri,1);
+ $listuriparts = explode('/', $list->uri);
+ $listurl = $listuriparts[1].'/'.$listuriparts[3];
$user = $list->user;
$listname = explode('/',$list->full_name);
$mode = $list->mode == 'private' ? "Private" : "Public";
<span class=\"rank_count\">Followers: {$list->subscriber_count} Members: {$list->member_count} $mode</span>
";
if ($list->description != '') $output .= "<span class=\"rank_description\">Description: $list->description</span>";
- if ($type == 0) $output .= "<span id=\"list_action\"><a id=\"btn\" href=\"javascript:void()\" class=\"unfollow_list\">Unfollow</a></span>";
- if ($type == 1 && $isSelf) $output .= "<span id=\"list_action\"><a id=\"btn\" href=\"javascript:void()\" class=\"edit_list\">Edit</a> <a id=\"btn\" href=\"javascript:void()\" class=\"delete_list\">Delete</a> <a id=\"btn\" href=\"javascript:void()\" class=\"add_member\">Add Members</a></span>";
+ if ($type == 0) $output .= "<span id=\"list_action\"><a id=\"btn\" href=\"#\" class=\"unfollow_list\">Unfollow</a></span>";
+ if ($type == 1 && $isSelf) $output .= "<span id=\"list_action\"><a href=\"#\" class=\"edit_list btn\">Edit</a> <a href=\"#\" class=\"delete_list btn\">Delete</a> <a href=\"#\" class=\"add_member btn\">Add Members</a></span>";
$output .= "
</div>
</li>
?>
<?php if ($isSelf && $type == 1) {?>
- <a href="#" class="more round" id="list_create_btn" style="margin: 20px auto;">Create a new list</a>
+ <div id="mylists_btns">
+ <a href="#" class="btn btn-white" id="list_create_btn">Create a new list</a>
+ </div>
<form method="POST" action="./lists.php?t=1" id="list_form">
<input type="hidden" name="list_spanid" value="" id="list_spanid" />
<input type="hidden" name="pre_list_name" value="" id="pre_list_name" />
<span><label for="list_name">List name</label><input type="text" name="list_name" id="list_name" /></span>
<span><label for="list_description">Description</label><textarea type="text" name="list_description" id="list_description"></textarea></span>
<span><label for="list_protect">Private</label><input type="checkbox" name="list_protect" id="list_protect" />
- <a style="background: transparent url(img/sprite-icons.png) no-repeat scroll -272px -16px; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous; text-decoration: none; height: 10px; float: right; position: relative; width: 9px; left: 3px; top: -160px;" title="Close" onclick="$('#list_form').slideToggle(300)" href="#"></a>
+ <a style="height: 10px; float: right; position: relative; width: 9px; left: 3px; top: -160px;" title="Close" class="close fa fa-times" onclick="$('#list_form').slideToggle(300);return false;" href="#"></a>
<input type="submit" class="btn" id="list_submit" value="" />
</span>
<?php
if ($type == 0 || $type == 2) {
if ($isSelf) {
- if ($prelist != 0) echo "<a id=\"less\" class=\"round more\" style=\"float: left;\" href=\"lists.php?t=$type&c=$prelist\">Back</a>";
- if ($nextlist != 0) echo "<a id=\"more\" class=\"round more\" style=\"float: right;\" href=\"lists.php?t=$type&c=$nextlist\">Next</a>";
+ if ($prelist != 0) echo "<a id=\"less\" class=\"btn btn-white\" style=\"float: left;\" href=\"lists.php?t=$type&c=$prelist\">Back</a>";
+ if ($nextlist != 0) echo "<a id=\"more\" class=\"btn btn-white\" style=\"float: right;\" href=\"lists.php?t=$type&c=$nextlist\">Next</a>";
} else {
- if ($prelist != 0) echo "<a id=\"less\" class=\"round more\" style=\"float: left;\" href=\"lists.php?id=$id&t=$type&c=$prelist\">Back</a>";
- if ($nextlist != 0) echo "<a id=\"more\" class=\"round more\" style=\"float: right;\" href=\"lists.php?id=$id&t=$type&c=$nextlist\">Next</a>";
+ if ($prelist != 0) echo "<a id=\"less\" class=\"btn btn-white\" style=\"float: left;\" href=\"lists.php?id=$id&t=$type&c=$prelist\">Back</a>";
+ if ($nextlist != 0) echo "<a id=\"more\" class=\"btn btn-white\" style=\"float: right;\" href=\"lists.php?id=$id&t=$type&c=$nextlist\">Next</a>";
}
}
?>
delCookie('oauth_token');
delCookie('oauth_token_secret');
delCookie('user_id');
- delCookie('twitese_name');
- delCookie('twitese_pw');
delCookie('friends_count');
delCookie('statuses_count');
delCookie('followers_count');
</fieldset>
</form>
<div style="background: none repeat scroll 0% 0% transparent;" id="footer">
-<p>© 2013 Contributors <?php if(isset($_COOKIE['twitese_name'])) echo 'and '.$_COOKIE['twitese_name'];?> · <a href="https://github.com/AstroProfundis/embrr" target="_blank" title="Embrr Open Source">Open Source</a></p>
+<p>© 2010-<?php echo date("Y") ?> Contributors · <a href="https://github.com/AstroProfundis/embrr" target="_blank" title="Embrr Open Source">Open Source</a></p>
</div>
</div>
</body>
</html>
-<?php ob_end_flush(); ?>
\ No newline at end of file
+<?php ob_end_flush(); ?>
setcookie('oauth_token',"",$time);
setcookie('oauth_token_secret',"",$time);
setcookie('user_id',"",$time);
- setcookie('twitese_name',"",$time);
setcookie('friends_count',"",$time);
setcookie('statuses_count',"",$time);
setcookie('followers_count',"",$time);
?>
<div id="statuses" class="column round-left">
- <?php if ( isset($_GET['id']) ) { ?>
- <h2>To <input type="text" style="border: 1px solid rgb(167, 166, 170); margin: 0px 0px 6px; padding: 2px; height: 14px; width: 120px; font-size: 13px;" name="sent_id" id="sent_id" value="<?php echo $_GET['id'] ?>"/></h2>
- <?php } else { ?>
- <h2>To <input type="text" style="border: 1px solid rgb(167, 166, 170); margin: 0px 0px 6px; padding: 2px; height: 14px; width: 120px; font-size: 13px;" name="sent_id" id="sent_id" /></h2>
- <?php } ?>
+ <h2>To <input type="text" style="border: 1px solid rgb(167, 166, 170); margin: 0px 0px 6px; padding: 2px; height: 14px; width: 120px; font-size: 13px;" name="sent_id" id="sent_id" value="<?php echo isset($_GET['id']) ? $_GET['id'] : ''; ?>"/></h2>
<?php include('inc/sentForm.php')?>
<?php
$t = getTwitter();
- $since_id = isset($_GET['since_id']) ? $_GET['since_id'] : false;
- $max_id = isset($_GET['max_id']) ? $_GET['max_id'] : false;
+ $since_id = isset($_GET['since_id']) ? $_GET['since_id'] : false;
+ $max_id = isset($_GET['max_id']) ? $_GET['max_id'] : false;
if ($isSentPage) {
$messages = $t->sentDirectMessages($since_id, $max_id);
$messages = $t->directMessages($since_id, $max_id);
}
if ($messages === false) {
- header('location: error.php');exit();
+ header('location: error.php?code='.$t->http_code);exit();
}
$count_t = count($messages);
$firstmsg = $messages[0]->id_str;
$lastmsg = bcsub($messages[count($messages)-1]->id_str, "1");
if ($isSentPage) {
- $output .= "<a id=\"less\" class=\"round more\" style=\"float: left;\" href=\"message.php?t=sent&since_id=" . $firstmsg . "\">Back</a>";
- $output .= "<a id=\"more\" class=\"round more\" style=\"float: right;\" href=\"message.php?t=sent&max_id=" . $lastmsg . "\">Next</a>";
+ $output .= "<a id=\"less\" class=\"btn btn-white\" style=\"float: left;\" href=\"message.php?t=sent&since_id=" . $firstmsg . "\">Back</a>";
+ $output .= "<a id=\"more\" class=\"btn btn-white\" style=\"float: right;\" href=\"message.php?t=sent&max_id=" . $lastmsg . "\">Next</a>";
} else {
- $output .= "<a id=\"less\" class=\"round more\" style=\"float: left;\" href=\"message.php?since_id=" . $firstmsg ."\">Back</a>";
- $output .= "<a id=\"more\" class=\"round more\" style=\"float: right;\" href=\"message.php?max_id=" . $lastmsg ."\">Next</a>";
+ $output .= "<a id=\"less\" class=\"btn btn-white\" style=\"float: left;\" href=\"message.php?since_id=" . $firstmsg ."\">Back</a>";
+ $output .= "<a id=\"more\" class=\"btn btn-white\" style=\"float: right;\" href=\"message.php?max_id=" . $lastmsg ."\">Next</a>";
}
$output .= "</div>";
--- /dev/null
+<?php
+ include ('lib/twitese.php');
+ $title = "Mutes";
+ include ('inc/header.php');
+ if (!loginStatus()) header('location: login.php');
+
+ $type = 'mutes';
+ include ('inc/userlist.php');
+ include ('inc/sidebar.php');
+ include ('inc/footer.php');
+?>
$time = $_SERVER['REQUEST_TIME']+3600*24*365;
setEncryptCookie('oauth_token', $access_token['oauth_token'], $time, '/');
setEncryptCookie('oauth_token_secret', $access_token['oauth_token_secret'], $time, '/');
- setEncryptCookie('user_id', $access_token['user_id'], $time, '/');
- setEncryptCookie('twitese_name', $t->screen_name, $time, '/');
+ setcookie('user_id', $access_token['user_id'], $time, '/');
+ setcookie('name', $t->screen_name, $time, '/');
refreshProfile();
if(!isset($_COOKIE['showpic'])){
$url = $connection->getAuthorizeURL($token);
if ( isset($_POST['proxify']) ) {
$raw= processCurl($url);
- $new = str_replace('https://api.twitter.com/oauth/authorize', 'authorize.php',$raw);
+ $formpreg = '/(<form( \w+=\"[^"]*\")* action=\")[^"]*(\"( \w+=\"[^"]*\")*>)/';
+ $new = preg_replace($formpreg, '\1authorize.php\3',$raw);
$new = str_replace('html { display:none; }','.error,a.sign-up,input[name="deny"]{display:none !important;}',$new);
$new = preg_replace('/https?:\/\/\w+([0-9])\.twimg\.com/i','https://s3.amazonaws.com/twitter_production',$new);
echo $new;
$statuses = $t->userTimeline(false, $since_id, $max_id);
if ($statuses === false) {
- header('location: error.php');exit();
+ header('location: error.php?code='.$t->http_code);exit();
}
$empty = count($statuses) == 0? true: false;
if ($empty) {
$output .= "</ol><div id=\"pagination\">";
- $output .= "<a id=\"less\" class=\"round more\" style=\"float: left;\" href=\"profile.php?since_id={$firstid}\">Back</a>";
- $output .= "<a id=\"more\" class=\"round more\" style=\"float: right;\" href=\"profile.php?max_id={$lastid}\">Next</a>";
+ $output .= "<a id=\"less\" class=\"btn btn-white\" style=\"float: left;\" href=\"profile.php?since_id={$firstid}\">Back</a>";
+ $output .= "<a id=\"more\" class=\"btn btn-white\" style=\"float: right;\" href=\"profile.php?max_id={$lastid}\">Next</a>";
$output .= "</div>";
$statuses = $t->replies($since_id, $max_id);
if ($statuses === false) {
- header('location: error.php');exit();
+ header('location: error.php?code='.$t->http_code);exit();
}
$count_t = count($statuses);
$output .= "</ol><div id=\"pagination\">";
- $output .= "<a id=\"less\" class=\"round more\" style=\"float: left;\" href=\"replies.php?since_id=" . $firstid . "\">Back</a>";
- $output .= "<a id=\"more\" class=\"round more\" style=\"float: right;\" href=\"replies.php?max_id=" . $lastid . "\">Next</a>";
+ $output .= "<a id=\"less\" class=\"btn btn-white\" style=\"float: left;\" href=\"replies.php?since_id=" . $firstid . "\">Back</a>";
+ $output .= "<a id=\"more\" class=\"btn btn-white\" style=\"float: right;\" href=\"replies.php?max_id=" . $lastid . "\">Next</a>";
$output .= "</div>";
}
$lastid = bcsub($lastid, "1");
$html .= '</ol><div id="pagination">';
- $html .= "<a id=\"less\" class=\"round more\" style=\"float: left;\" href=\"retweets.php?since_id={$firstid}\">Back</a>";
- $html .= "<a id=\"more\" class=\"round more\" style=\"float: right;\" href=\"retweets.php?max_id={$lastid}\">Next</a>";
+ $html .= "<a id=\"less\" class=\"btn btn-white\" style=\"float: left;\" href=\"retweets.php?since_id={$firstid}\">Back</a>";
+ $html .= "<a id=\"more\" class=\"btn btn-white\" style=\"float: right;\" href=\"retweets.php?max_id={$lastid}\">Next</a>";
$html .= "</div>";
}
echo $html;
$output .= "</ol><div id=\"pagination\">";
$next_results = isset($answer->search_metadata->next_results) ? $answer->search_metadata->next_results : false;
- if ($next_results) $output .= "<a id=\"more\" class=\"round more\" style=\"float: right;\" href=\"search.php". $next_results ."\">Next</a>";
+ if ($next_results) $output .= "<a id=\"more\" class=\"btn btn-white\" style=\"float: right;\" href=\"search.php". $next_results ."\">Next</a>";
$output .= "</div>";
echo $output;
}
<form action="search.php" method="get" id="search_form">
<input type="text" name="q" id="query" value="<?php echo $_GET['q'] ?>" autocomplete="off" />
- <input type="submit" class="more round" style="width: 73px; margin-left: 10px; display: block; float: left; height: 34px; font-family: tahoma; color: rgb(51, 51, 51);" value="Search">
- <input type="button" class="more round" style="width: 73px; margin-left: 10px; display: block; float: right; height: 34px; font-family: tahoma; color: rgb(51, 51, 51);" value="Save" id="btn_savesearch">
+ <span class="suggestion_loading fa fa-spinner fa-spin"></span>
+ <input type="submit" class="btn btn-white" value="Search">
+ <input type="button" class="btn btn-white" value="Save" id="btn_savesearch">
</form>
<?php
$sinceid = false;
<br /><br />
<input id="sidebarscroll" type="checkbox" />
<label>Fixed Sidebar</label>
-
+
+ <br /><br />
+ Share to Twitter: <a class="share" title="Drag me to share!" href="javascript:var%20d=document,w=window,f='<?php echo $base_url."/share.php" ?>',l=d.location,e=encodeURIComponent,p='?u='+e(l.href)+'&t='+e(d.title)+'&d='+e(w.getSelection?w.getSelection().toString():d.getSelection?d.getSelection():d.selection.createRange().text)+'&s=bm';a=function(){if(!w.open(f+p,'sharer','toolbar=0,status=0,resizable=0,width=600,height=300,left=175,top=150'))l.href=f+'.new'+p};if(/Firefox/.test(navigator.userAgent))setTimeout(a,0);else{a()}void(0);">Share</a>
+ <small>(Bookmark this link for future use)</small>
+
</fieldset>
<fieldset class="settings">
<label>Use nickname instead of username</label>
<br /><br />
-
- <label>Custom Themes</label>
- <select id="styleSelect"></select>
- <small>(We have awesome themes for you!)</small>
-
- <br /><br />
<label>Background Color</label>
<input class="bg_input" type="text" id="bodyBg" name="bodyBg" value="<?php echo getDefCookie("Bgcolor","") ?>" />
.more{background-color:#FFF;background-image:url("../img/more.gif");background-position:left top;background-repeat:repeat-x;border-color:#DDD #AAA #AAA #DDD;border-style:solid;border-width:1px;display:block;font-family:Helvetica;font-size:18px;font-weight:700;height:22px;letter-spacing:1px;line-height:2em;margin-bottom:6px;outline-style:none;outline-width:medium;padding:6px 0;width:100%}
.more:hover{background-position:left -78px;border:1px solid #bbb;text-decoration:none}
.more:active{background-position:left -38px;color:#666}
-.more.loading{background-color:#fff;background-image:url(../img/ajax.gif);background-position:50% 50%;background-repeat:no-repeat;border:1px solid #eee;cursor:default!important}
.more::-moz-focus-inner{border:0}
.round{-moz-border-radius:8px;border-radius:8px}
#shareBtn{color:#666;display:block;height:45px;margin:0 auto;text-shadow:0 1px 0 #FFF;vertical-align:top;width:300px;line-height:1em}
</style>
-<script src="https://ajax.aspnetcdn.com/ajax/jquery/jquery-1.8.3.min.js"></script>
-<script src="js/jquery.js"></script>
+<script src="https://ajax.aspnetcdn.com/ajax/jquery/jquery-2.1.1.min.js"></script>
+<script src="js/jquery.embrr.utils.js"></script>
<script>
$(function(){leaveWord();
$("#textbox").focus().bind("keyup","keydown",function(){leaveWord()});
$statusid = $_GET['id'];
$status = $t->showStatus($statusid);
if (!$status) {
- header('location: error.php');exit();
+ header('location: error.php?code='.$t->http_code);exit();
}
$user = $status->user;
$date = format_time($status->created_at);
- $text = formatEntities($status->entities,$status->text);
+ $text = formatEntities(
+ $status->entities,
+ isset($status->extended_entities) ? $status->extended_entities : null,
+ $status->text);
} else {
- header('location: error.php');exit();
+ header('location: error.php?code='.$t->http_code);exit();
}
?>
.wrapper {margin:1em auto;position:relative;width:600px}
#statuses{background-color:#FFFFFF;float:left;padding:10px;width:580px}
.timeline li:hover, .rank_list li:hover {background-color:transparent !important}
-.timeline, .ajax_timeline {border-bottom:1px solid #FFF !important;border-top:1px solid #FFF !important}
-.timeline li, .ajax_timeline li {border-bottom:1px solid #FFF !important;border-top:1px solid #FFF !important}
+.timeline {border-bottom:1px solid #FFF !important;border-top:1px solid #FFF !important}
+.timeline li {border-bottom:1px solid #FFF !important;border-top:1px solid #FFF !important}
.status_body {display:block;font-size:2em;line-height:30px;margin-left:58px;overflow:hidden;position:relative}
.timeline li {cursor:default;margin:0px;overflow:hidden;padding:10px;position:relative}
.status_author, .rank_img {left:10px;position:absolute;top:15px;width:50px}
.retweet_info {color:#999;display:block;font-size:11px;margin:0;text-align:left;width:100%}
</style>
-<script src="https://ajax.aspnetcdn.com/ajax/jquery/jquery-1.8.3.min.js"></script>
-<script src="js/jquery.js"></script>
+<script src="https://ajax.aspnetcdn.com/ajax/jquery/jquery-2.1.1.min.js"></script>
+<script src="js/jquery.embrr.utils.js"></script>
<script src="js/mediaPreview.js"></script>
<script src="js/public.js"></script>
</head>
</span>
<span class="status_body">
<span class="status_id"><?php echo $statusid ?></span>
- <span class="status_word"><a class="user_name" href="user.php?id=<?php echo $user->screen_name ?>" id="<?php echo $user->screen_name ?>"><?php if ($_COOKIE['shownick']=='true') echo $user->name; else echo $user->screen_name; ?></a> <span class="tweet"><?php echo $text ?></span></span>
+ <span class="status_word"><a class="user_name" href="user.php?id=<?php echo $user->screen_name ?>" id="<?php echo $user->screen_name ?>"><?php if ($_COOKIE['shownick']=='true') echo $user->name; else echo $user->screen_name; ?></a> <span class="tweet"><?php echo $text['text'] ?></span></span>
+ <span class="extended_entities"><?php echo $text['extended'] ?></span>
<span class="status_info">
<?php if ($status->in_reply_to_status_id_str) {?><span class="in_reply_to"> <a href="status.php?id=<?php echo $status->in_reply_to_status_id_str ?>">in reply to <?php echo $status->in_reply_to_screen_name?></a></span> <?php }?>
<span class="source">from <?php echo $status->source ?></span>
<div id="statuses" class="column round-left">
<?php
if (!loginStatus() || !isset($_GET['id'])) {
- header('location: error.php');exit();
+ header('location: error.php?code='.$t->http_code);exit();
}
$t = getTwitter();
}
if ($statuses === false) {
- header('location: error.php');exit;
+ header('location: error.php?code='.$t->http_code);exit;
}
if ($t->http_code == 429) {
$apiout = true;
$user = $t->showUser($userid);
if (strcasecmp($userid,$t->username) == 0) {header('location: profile.php');exit();}
- $isProtected = ($statuses == 'protected') || ($statuses->error == 'Not authorized');
+ $isProtected = $statuses->error == 'Not authorized.';
$r = getRelationship($user->screen_name);
- $isFriend = $r == 2 || $r == 1;
- $isFollower = $r == 3 || $r == 1;
- $isBlocked = $r == 4;
+ $isFriend = ($r & 1) != 0;
+ $isFollower = ($r & 2) != 0;
+ $isBlocked = ($r & 4) != 0;
+ $isMuted = ($r & 8) != 0;
if (!$isProtected) {
<a href="https://twitter.com/<?php echo $userid ?>"><img id="info_headimg" src="<?php echo $userinfo['image_url'] ?>" /></a>
<div id="info_name" style="display:inline-block"><?php echo $userid ?></div>
<?php if ($isFollower) {?>
- <span id="following_me" style="display:inline!important"><img style="" src="img/yes.gif" alt="" class="icon"/><span>Following me</span></span>
+ <span id="following_me" style="display:inline!important">
+ <span class="fa fa-check is-following"></span>
+ <span>Following me</span>
+ </span>
<?php
}
?>
<?php }else{ ?>
<a class='btn' id='block_btn' href='#'>Block</a>
<?php } ?>
+<?php if($isMuted){ ?>
+ <a class='btn' id='unmute_btn' href='#'>Unmute</a>
+<?php }else{ ?>
+ <a class='btn' id='mute_btn' href='#'>Mute</a>
+<?php } ?>
<a class="btn" id="info_reply_btn" href="#">Reply</a>
<a class="btn" id="info_hide_btn" href="#">Hide @</a>
- <a class="btn " id="report_btn" href="#" style="color:#a22">Report Spam</a>
+ <a class="btn" id="report_btn" href="#" style="color:#a22">Report Spam</a>
</div>
</div>
<div class="clear"></div>
$output .= "</ol><div id=\"pagination\">";
if ($_GET['fav'] == true) {
- $output .= "<a id=\"less\" class=\"round more\" style=\"float: left;\" href=\"user.php?id=$userid&fav=true&since_id={$firstid}\">Back</a>";
- $output .= "<a id=\"more\" class=\"round more\" style=\"float: right;\" href=\"user.php?id=$userid&fav=true&max_id={$lastid}\">Next</a>";
+ $output .= "<a id=\"less\" class=\"btn btn-white\" style=\"float: left;\" href=\"user.php?id=$userid&fav=true&since_id={$firstid}\">Back</a>";
+ $output .= "<a id=\"more\" class=\"btn btn-white\" style=\"float: right;\" href=\"user.php?id=$userid&fav=true&max_id={$lastid}\">Next</a>";
} else {
- $output .= "<a id=\"less\" class=\"round more\" style=\"float: left;\" href=\"user.php?id=$userid&since_id={$firstid}\">Back</a>";
- $output .= "<a id=\"more\" class=\"round more\" style=\"float: right;\" href=\"user.php?id=$userid&max_id={$lastid}\">Next</a>";
+ $output .= "<a id=\"less\" class=\"btn btn-white\" style=\"float: left;\" href=\"user.php?id=$userid&since_id={$firstid}\">Back</a>";
+ $output .= "<a id=\"more\" class=\"btn btn-white\" style=\"float: right;\" href=\"user.php?id=$userid&max_id={$lastid}\">Next</a>";
}
$output .= "</div>";
echo $output;
<div id="info_name"><?php echo $userid ?></div>
<div id="info_relation">
<?php if ($isFriend) {?>
- <a id="info_block_btn" class="btn_hover" href="#">Unfollow</a>
+ <a id="info_block_btn" class="btn" href="#">Unfollow</a>
<?php } else { ?>
<a id="info_follow_btn" class="btn" href="#">Follow</a>
<?php } ?>
<a class="btn" id="info_send_btn" href="message.php?id=<?php echo $userid ?>">Send DM</a>
<?php } ?>
<?php if($isBlocked){ ?>
- <a class='btn_hover' id='unblock_btn' href='#'>Unblock</a>
+ <a class='btn' id='unblock_btn' href='#'>Unblock</a>
<?php }else{ ?>
<a class='btn' id='block_btn' href='#'>Block</a>
<?php } ?>
+<?php if($isMuted){ ?>
+ <a class='btn' id='unmute_btn' href='#'>Unmute</a>
+<?php }else{ ?>
+ <a class='btn' id='mute_btn' href='#'>Mute</a>
+<?php } ?>
<a class="btn" id="info_reply_btn" href="#">Reply</a>
<a class="btn" id="info_hide_btn" href="#">Hide @</a>
</div>